{
  "swagger": "2.0",
  "info": {
    "version": "v1",
    "title": "Re-Leased REST API Documentation",
    "description": "# Obtaining a valid access token using OAuth 2.0\r\nEach request made to a Re-Leased API end point to access user data requires a valid access token. We provide an [OAuth 2.0](https://oauth.net/2/) implementation to obtain this token in a secure, industry best practise way.\r\n\r\n## Overview of workflow\r\n![alt text](/content/images/oauth-diagram.png \"OAuth workflow diagram\")\r\n\r\nThe authorisation sequence begins when your application redirects a browser to a Re-Leased authorisation URL; the URL includes query parameters that indicate the type of access being requested. As in other scenarios, Re-Leased handles user authentication, session selection, and user consent. The result is an authorisation code, which Re-Leased returns to your application in a query string.\r\n\r\nAfter receiving the authorisation code, your application can exchange the code (along with a client ID and client secret) for an access token.\r\n\r\nThe application can then use the access token to access an end-point within the Re-Leased API.\r\n\r\n## Prerequisites\r\nYou need to be enrolled as an approved developer with Re-Leased and have been allocated a set of OAuth 2.0 credentials (specifically a unique Client Id, and Client secret). And have informed Re-Leased of the exact Return Url (known as the redirect_uri parameter) for your application before any valid requests can be made.\r\n\r\nWhen you have read this documentation and are ready to enrol as a developer with Re-Leased. [**Please request your access credentials by filling in this form.**](https://forms.office.com/r/RpN2hRmJD3)\r\n\r\n## Forming the URL\r\nThe URL used when authorising a user is:\r\n- `https://api.re-leased.com/authorise`\r\n\r\nNote: This (and all other) endpoints are accessible over secure HTTPS (SSL) connections only.\r\n\r\nEndpoint|Description\r\n--------|-----------\r\n`https://api.re-leased.com/authorise`|This endpoint is the target of the authorisation request. It handles authenticating the user. The result of requests to this endpoint is a temporary/short term authorisation code - valid for 30 seconds or until used.\r\n\r\nThe set of query string parameters supported by the Re-Leased Authorisation Server for web server applications are:\r\n\r\nParameter|Values|Description\r\n---------|------|-----------\r\nresponse_type|`code`|Determines whether the Re-Leased OAuth 2.0 endpoint returns an authorisation code. Web server applications should use `code`.\r\nclient_id|The client ID you obtain from Re-Leased.|Identifies the client that is making the request. The value passed in this parameter must exactly match the value you obtained from Re-Leased.\r\nredirect_uri|The value listed for this project.|Determines where the user is returned to (along with the authorisation code parameter). The value of this parameter should be url encoded and must exactly match the value listed for this project (including the http or https scheme, case, and trailing '/').\r\nscope|Space-delimited set of permissions that the application requests.<br/><br/>Currently, the valid scopes supported are:<br/><br/>single-sign-on<br/>inspections<br/>maintenance<br/>notes<br/>properties<br/>tenancies<br/>user<br/>trustaccounts<br/>taxtypes<br/>invoices<br/>creditnotes<br/>accounts<br/>company<br/>contacts<br/>payments<br/>insurance<br/>budgets<br/><br/>Additional scopes will be added as we expand the API end-points available.|Identifies the Re-Leased API access that your application is requesting. The values passed in this parameter inform the consent screen that is shown to the user.\r\nstate|Any string|Provides any state that might be useful to your application upon receipt of the response. The Re-Leased Authorization Server roundtrips this parameter, so your application receives the same value it sent. To mitigate against cross-site request forgery (CSRF), it is strongly recommended to include an anti-forgery token in the state, and confirm it in the response.\r\n\r\nAn example of a valid url would look like:\r\n`https://api.re-leased.com/authorise?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=https%3A%2F%2Fwww.yoursite.com%2Freleased_auth_finished&scope=inspections%20properties%20tenancies&state=YOUR_STATE`\r\n\r\n## Handling the response\r\n\r\nThe response will be sent to the redirect_uri as specified in the request URL. If the user approves the access request, then the response contains an authorisation code and the state parameter (if included in the request). If the user does not approve the request, the response contains an error message. **Authorisation codes are only valid for 30 seconds - or until used.** All responses are returned to the web server on the query string, as shown below:\r\n\r\nA valid authorisation code response:\r\nhttps://yoursite.com/code?code=89f26a3a-919e-4703-9ddd-d0e2d5ad8de3&state=YOUR_STATE\r\n\r\nAn error response:\r\nhttps://yoursite.com/code?error=access_denied&state=YOUR_STATE\r\n\r\n**Important security note:** if your response endpoint renders an HTML page, any resources on that page will be able to see the authorisation code in the URL. Scripts can read the URL directly, and all resources may be sent the URL in the Referrer HTTP header. Carefully consider if you want to send authorisation credentials to all resources on that page (especially third-party scripts such as social plugins and analytics). To avoid this issue, we recommend that the server first handle the request, then redirect to another URL that doesn't include the response parameters.\r\n\r\nAfter the web server receives the authorisation code, it may exchange the authorisation code for an access token.\r\n\r\nThe URL used when exchanging the authorisation code for an access token is:\r\n- `https://api.re-leased.com/token`\r\n\r\nNote: This (and all other) endpoints are accessible over SSL connections only.\r\n\r\nEndpoint|Description\r\n--------|-----------\r\n`https://api.re-leased.com/token`|This endpoint is the target of the token swap request. It handles validating the authorisation token and swapping it for an access token. The result of requests to this endpoint is an access token.\r\n\r\nThis request is an **HTTPS POST**, and includes the following parameters:\r\n\r\nField|Description\r\n-----|-----------\r\ncode|The authorisation code returned from the initial request.\r\nclient_id|The client ID obtained from Re-Leased.\r\nclient_secret|The client secret obtained from Re-Leased.\r\nredirect_uri|The redirect URI listed for this project.\r\ngrant_type|As defined in the OAuth 2.0 specification, this field must contain a value of authorization_code (Note US spelling)\r\n\r\nA successful response to this request contains the following fields:\r\n\r\nField|Description\r\n-----|-----------\r\naccess_token|The access token that can now be used to request resources from a Re-Leased API end-point.\r\nexpires_in|The remaining lifetime of the access token (in seconds).\r\ntoken_type|Identifies the type of token returned. At this time, this field will always have the value Bearer\r\nrefresh_token|Not implemented (value will always be the string `void`)\r\n\r\n## Access Token Expiration\r\nTokens will currently expire **one year** after being issued. Once the token expires, you will need to go through the authorization & token flow to fetch a new access token.\r\n\r\nWhen a token is expired, the end points will return the following response:\r\n\r\nHttp Status|Message\r\n----------|----------\r\n401|Authorization has been denied for this request\r\n\r\n# Calling a Re-Leased API end-point\r\n\r\nAfter your application obtains an access token, you can use the token to make calls to a Re-Leased API end-point on behalf of a given user account or service account. To do this, include the access token in a request to the API by including an [Authorization: Bearer HTTP header](https://tools.ietf.org/html/rfc6750).\r\n\r\n## Re-Leased API Rate Limits\r\n\r\nIn order to ensure consumers are calling our APIs in a responsible way we will enforce some sensible limits to the number/frequency of API calls that a consumer can make. If you exceed a rate limit you will receive a `HTTP 429 (Too Many Requests)` response.\r\n\r\nLimit Type|Limitation\r\n----------|----------\r\nMinute Limit|60 calls in a rolling 60 second window\r\nDaily Limit|10,000 calls in a rolling 24 hour window\r\n\r\nIf you feel you have a genuine reason why these rate limits are not sufficient for your project, please get in touch to discuss.\r\n",
    "termsOfService": "https://re-leased.com/resources/terms-conditions",
    "contact": {
      "url": "https://re-leased.com"
    },
    "x-logo": {
      "url": "/content/images/api-logo.png",
      "backgroundColor": "#4ac06b",
      "altText": "Re-Leased"
    }
  },
  "host": "api.re-leased.com",
  "schemes": [
    "https"
  ],
  "paths": {
    "/api/accounts": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "Retrieve a list of accounts",
        "description": "Retrieves a list of accounts for the supplied company id\r\n<br /><br />\r\nScope required: accounts\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/accounts",
        "operationId": "Accounts_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "description": "Company id for the accounts",
            "required": true,
            "type": "string",
            "default": "e7927f26-2ee9-40e4-aab8-c7a0afb0f0f1"
          },
          {
            "name": "updatedAfterDate",
            "in": "query",
            "description": "Gets accounts updated after the specified date (UTC). E.g. 2024-02-07T20:40:38",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/AccountResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": [
                  {
                    "Code": "1000",
                    "Name": "Test Account",
                    "UpdatedDate": "2026-11-15T11:56:47.1482444Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/properties/{propertyId}/areas": {
      "get": {
        "tags": [
          "Areas"
        ],
        "summary": "Retrieve a list of areas for a property",
        "description": "Retrieves a paginated list of active areas for the supplied property.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/properties/{propertyId}/areas",
        "operationId": "Areas_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "propertyId",
            "in": "path",
            "description": "The unique identifier (Guid) of the property whose areas to list. Required.",
            "required": true,
            "type": "string"
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of records to skip (default 0).",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of records to return (default 100, max 100).",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "updatedAfterDate",
            "in": "query",
            "description": "Filters to areas with an audited change after the specified UTC date (e.g. 2024-02-07T20:40:38) - the same \"Last updated\" signal shown in the web UI. Areas with no audited change are not returned. If null, no date filter is applied.",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "includeCustomFields",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/AreasDataModel"
            },
            "examples": {
              "application/json": {
                "Areas": [
                  {
                    "GlobalIdentifier": "5e45df80-60b0-4b4a-9add-4698edcda109",
                    "PropertyGlobalIdentifier": "3cf2ffae-b142-40d3-be82-b49f1486980f",
                    "Title": "Suite 101",
                    "Notes": null,
                    "AreaTypeId": 42,
                    "AreaTypeName": "Office",
                    "SuiteNumber": "101",
                    "FloorNumber": 1,
                    "Size": 150.5,
                    "SizeUnit": "SquareMetre",
                    "DefaultRent": 32760.0,
                    "EpcRatingId": 7,
                    "EpcRating": "B",
                    "VatElected": null,
                    "IsActive": true,
                    "IsOccupied": true,
                    "AllocatedToTenancyIds": [
                      "467ee13a-e859-45a6-b022-d364bf58bc48"
                    ],
                    "UpdatedDate": "2026-11-15T11:56:47.1482444Z",
                    "CustomFields": [
                      {
                        "FieldIdentifier": "floor-covering",
                        "Label": "Floor Covering",
                        "Type": "Dropdown",
                        "Value": "Carpet"
                      },
                      {
                        "FieldIdentifier": "number-of-desks",
                        "Label": "Number of Desks",
                        "Type": "Decimal",
                        "Value": 12.0
                      },
                      {
                        "FieldIdentifier": "fire-exit",
                        "Label": "Fire Exit",
                        "Type": "Boolean",
                        "Value": true
                      }
                    ]
                  }
                ],
                "Pagination": {
                  "Offset": 0,
                  "Limit": 100
                },
                "TotalCount": 1
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Areas"
        ],
        "summary": "Create a new area",
        "description": "Creates a new area on the supplied property.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br /><b>Request header</b>: A new <i>Idempotency-Key</i> should be supplied with every POST request irrespective of the response type.<br />\r\nIf the area is successfully created and the same <i>Idempotency-Key</i> is used in subsequent requests, the response returned will be the same area created the first time.\r\n<i>Idempotency-Key</i> can be a string or Guid.\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/properties/{propertyId}/areas",
        "operationId": "Areas_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "propertyId",
            "in": "path",
            "description": "The unique identifier (Guid) of the property the area belongs to. Required.",
            "required": true,
            "type": "string"
          },
          {
            "name": "createAreaRequest",
            "in": "body",
            "description": "Details for the new area",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateAreaRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "33dcd47d-4399-44b6-a33c-5be3d91d8bbb"
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/AreaData"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/areas/{id}": {
      "get": {
        "tags": [
          "Areas"
        ],
        "summary": "Retrieve a single area by id",
        "description": "Retrieves a single area by id for the authorised user.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/areas/{id}",
        "operationId": "Areas_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the area",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "8c5fdcc3-d44c-4c5e-a74e-10d820e225fd"
          },
          {
            "name": "includeCustomFields",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/AreaData"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Areas"
        ],
        "summary": "Archive an area",
        "description": "Archives (soft-deletes) the area. An area that is still allocated to one or more active\r\ntenancies cannot be archived - remove it from those tenancies first.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/areas/{id}",
        "operationId": "Areas_Delete",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the area",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "945ef3aa-86e5-42a0-a6a2-8408a7c8f819"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "5a9fb79b-35bc-4a5d-99ed-cac155da7c15"
          }
        ],
        "responses": {
          "204": {
            "description": "NoContent"
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Areas"
        ],
        "summary": "Update an area",
        "description": "Updates an existing area. Only the fields included in the request body are changed;\r\nany field you leave out is left as-is. An area cannot be moved between properties.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/areas/{id}",
        "operationId": "Areas_Patch",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the area",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "2d25e549-5a85-49c2-a84f-ce9129666ef3"
          },
          {
            "name": "updateAreaRequest",
            "in": "body",
            "description": "Fields to update. Omit fields you don't want to change.",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateAreaRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "2af587f3-f254-4515-af72-b56d79a7ec15"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/AreaData"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/budgets": {
      "get": {
        "tags": [
          "Budgets"
        ],
        "summary": "Retrieve a list of budgets",
        "description": "Retrieves the outgoings / service charge budgets on properties the authorised user can access: the budget header with\r\nits period, status and totals. Filters combine. Archived budgets and superseded versions of a budget are never returned,\r\nand Draft budgets are only returned when status includes Draft.\r\n<br /><br />\r\nUse GET api/budgets/{id} for a budget's schedules and tenancy allocations.\r\n<br /><br />\r\nResults are paged. When more results exist, MetaData.NextPageUrl holds the request for the next page, with your filters kept.\r\n<br /><br />\r\nScope required: budgets\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/budgets",
        "operationId": "Budgets_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "propertyId",
            "in": "query",
            "description": "Only return budgets on this property (Guid)",
            "required": false,
            "type": "string"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Comma-separated list of statuses to return: Draft, Approved, Locked, Reconciled. E.g. Locked,Reconciled. Defaults to every status except Draft.",
            "required": false,
            "type": "string"
          },
          {
            "name": "endDateFrom",
            "in": "query",
            "description": "Only return budgets whose period ends on or after this date (the company's local date; any time part is ignored). E.g. 2026-01-01",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "endDateTo",
            "in": "query",
            "description": "Only return budgets whose period ends on or before this date (the company's local date; any time part is ignored). E.g. 2026-12-31",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "updatedAfterDate",
            "in": "query",
            "description": "Only return budgets updated after this date (UTC). E.g. 2024-02-07T20:40:38",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "fromId",
            "in": "query",
            "description": "Gets the page of budgets after the specified budget id. Use MetaData.NextPageUrl rather than setting this yourself.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of budgets per page, 1 to 100. Defaults to 100.",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/BudgetDataModel"
            },
            "examples": {
              "application/json": {
                "Budgets": [
                  {
                    "Id": "7fb69cf9-e249-4098-9cb7-cbd462315ed0",
                    "PropertyId": "feafb69f-8faa-4e6d-8916-177a8d96189d",
                    "Title": "FY25 Outgoings",
                    "PeriodStartDate": "2024-07-01",
                    "PeriodEndDate": "2025-06-30",
                    "Status": "Reconciled",
                    "LockedDateUtc": "2025-07-14T02:30:00Z",
                    "ReconciledDateUtc": "2025-09-01T03:00:00Z",
                    "PreviousBudgetId": null,
                    "TotalBudgeted": 250000.0,
                    "TotalActual": 246380.55,
                    "UpdatedDateUtc": "2026-11-12T00:00:00Z"
                  },
                  {
                    "Id": "dd4e3042-2235-48fb-aea0-2796586da20d",
                    "PropertyId": "feafb69f-8faa-4e6d-8916-177a8d96189d",
                    "Title": "FY26 Outgoings",
                    "PeriodStartDate": "2025-07-01",
                    "PeriodEndDate": "2026-06-30",
                    "Status": "Approved",
                    "LockedDateUtc": null,
                    "ReconciledDateUtc": null,
                    "PreviousBudgetId": "7fb69cf9-e249-4098-9cb7-cbd462315ed0",
                    "TotalBudgeted": 250000.0,
                    "TotalActual": null,
                    "UpdatedDateUtc": "2026-11-12T00:00:00Z"
                  }
                ],
                "MetaData": {
                  "NextPageUrl": "/api/budgets?propertyId=feafb69f-8faa-4e6d-8916-177a8d96189d&limit=2&fromId=dd4e3042-2235-48fb-aea0-2796586da20d"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/budgets/{id}": {
      "get": {
        "tags": [
          "Budgets"
        ],
        "summary": "Retrieve a budget",
        "description": "Retrieves one outgoings / service charge budget, of any status including Draft.\r\nSchedules, TenancyAllocations and Reconciliation are only present when requested.\r\n<br /><br />\r\nA reconciliation's balancing charges link to the invoices and credit notes raised for them: use GET api/invoices/{id}\r\n(invoices scope) and GET api/credit-notes/{id} (creditnotes scope). A negative balancing amount is a refund or credit to the tenant.\r\n<br /><br />\r\nScope required: budgets\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/budgets/{id}",
        "operationId": "Budgets_GetById",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the budget",
            "required": true,
            "type": "string",
            "default": "78b5e9b1-8025-45e4-8898-b7300f43c522"
          },
          {
            "name": "includeSchedules",
            "in": "query",
            "description": "Include the budget's schedules, with each account's budgeted and actual amounts. Defaults to false.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "includeTenancyAllocations",
            "in": "query",
            "description": "Include each tenancy area's annual budgeted contribution. Defaults to false.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "includeReconciliation",
            "in": "query",
            "description": "Include the year-end reconciliation summary and each tenancy's balancing charge. Null unless the budget is Locked or Reconciled. Defaults to false.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/BudgetData"
            },
            "examples": {
              "application/json": {
                "Id": "b98a0813-a181-4e50-b2ad-70067c384e00",
                "PropertyId": "9e52de36-49d5-49c2-a3da-9d6e41ff4e00",
                "Title": "FY25 Outgoings",
                "PeriodStartDate": "2024-07-01",
                "PeriodEndDate": "2025-06-30",
                "Status": "Reconciled",
                "LockedDateUtc": "2025-07-14T02:30:00Z",
                "ReconciledDateUtc": "2025-09-01T03:00:00Z",
                "PreviousBudgetId": "fd714906-5957-499d-8756-9752c59fe2e5",
                "TotalBudgeted": 250000.0,
                "TotalActual": 246380.55,
                "UpdatedDateUtc": "2026-11-12T00:00:00Z",
                "Schedules": [
                  {
                    "Id": 4127,
                    "Title": "Building outgoings",
                    "Basis": "PercentageOfFloorArea",
                    "Accounts": [
                      {
                        "AccountCode": "6100",
                        "AccountName": "Cleaning",
                        "Budgeted": 90000.0,
                        "Actual": 92380.55
                      },
                      {
                        "AccountCode": "6200",
                        "AccountName": "Insurance",
                        "Budgeted": 160000.0,
                        "Actual": 154000.0
                      }
                    ]
                  }
                ],
                "TenancyAllocations": [
                  {
                    "TenancyId": "93c5f89a-44af-44b3-b317-661fcad3ef15",
                    "AreaId": "9c5c824e-6bed-44fc-97bb-61d86a0493c4",
                    "AnnualBudgetedAmount": 150000.0
                  },
                  {
                    "TenancyId": "60581f45-7eeb-47b9-aefd-cdc1230fb509",
                    "AreaId": "837210e1-3ccf-4fb8-954b-9f1e5fed31cb",
                    "AnnualBudgetedAmount": 62500.0
                  }
                ],
                "Reconciliation": {
                  "ExpenditureToDate": 246380.55,
                  "InvoicedToTenants": 212500.0,
                  "BalancingAmount": -1266.81,
                  "OwnerContribution": 35147.36,
                  "Tenancies": [
                    {
                      "TenancyId": "93c5f89a-44af-44b3-b317-661fcad3ef15",
                      "AreaId": "9c5c824e-6bed-44fc-97bb-61d86a0493c4",
                      "InvoicedAmount": 150000.0,
                      "BalancingAmount": -2171.67,
                      "Status": "Completed",
                      "InvoiceId": null,
                      "CreditNoteId": "736172eb-8337-4976-ad8b-efb5313d158b"
                    },
                    {
                      "TenancyId": "60581f45-7eeb-47b9-aefd-cdc1230fb509",
                      "AreaId": "837210e1-3ccf-4fb8-954b-9f1e5fed31cb",
                      "InvoicedAmount": 62500.0,
                      "BalancingAmount": 904.86,
                      "Status": "Completed",
                      "InvoiceId": "ed52950b-1535-4655-ad83-dcde2a2de751",
                      "CreditNoteId": null
                    },
                    {
                      "TenancyId": null,
                      "AreaId": "9f097d48-79e6-45e5-88b4-cd92859d1a66",
                      "InvoicedAmount": 0.0,
                      "BalancingAmount": 0.0,
                      "Status": "New",
                      "InvoiceId": null,
                      "CreditNoteId": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/companies/{id}": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Retrieve a single company details",
        "description": "Retrieves company details for supplied company id\r\n<br /><br />\r\nScope required: company\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/companies/{id}",
        "operationId": "Companies_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company id",
            "required": true,
            "type": "string",
            "default": "0a0fbf51-42b9-4498-9761-30be59d5b006"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CompanyResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": {
                  "Id": "8ec0ef31-1ee4-4512-93e8-f4724969656b",
                  "Name": "Snow Industries",
                  "TimeZone": "New Zealand Standard Time",
                  "Culture": "en-NZ"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/companies": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Retrieve all companies for user",
        "description": "Retrieves all companies' details associated to the current user.\r\n<br /><br />\r\nScope required: company\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/companies",
        "operationId": "Companies_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CompanyListResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": [
                  {
                    "Id": "a9ac1ac6-3e7e-4d27-969f-e613a859856b",
                    "Name": "Snow Industries",
                    "TimeZone": "New Zealand Standard Time",
                    "Culture": "en-NZ"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/contacts": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Retrieve a list of contacts",
        "description": "Retrieves a list of contacts for supplied company id\r\n<br /><br />\r\nScope required: Contacts\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/contacts",
        "operationId": "Contacts_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "description": "Company id of the contacts, please provide a guid for an example response",
            "required": true,
            "type": "string",
            "default": "111ab779-19c6-43ef-b3b0-a67bf86e5524"
          },
          {
            "name": "propertyId",
            "in": "query",
            "description": "Gets the contacts for the specified property id",
            "required": false,
            "type": "string"
          },
          {
            "name": "fromId",
            "in": "query",
            "description": "Gets contacts from a specified id",
            "required": false,
            "type": "string"
          },
          {
            "name": "updatedAfterDate",
            "in": "query",
            "description": "Gets contacts updated after the specified date (UTC). E.g. 2024-02-07T20:40:38",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "tag",
            "in": "query",
            "description": "Gets contacts with the specified tag assigned. Matches active tags only, so a tag that has since been archived returns no contacts.",
            "required": false,
            "type": "string"
          },
          {
            "name": "includeCustomFields",
            "in": "query",
            "description": "Includes custom field values for each contact in the response. Only fields with a value are returned; empty when the company has no custom fields subscription.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "includeTags",
            "in": "query",
            "description": "Includes the names of the active tags assigned to each contact in the response. Tags are shared across the company's billing group, so a tag assigned by a sibling company is included.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ContactResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": [
                  {
                    "Id": "00000000-0000-0000-0000-000000000000",
                    "CompanyMaps": [
                      {
                        "Id": "00000000-0000-0000-0000-000000000000",
                        "IsActive": false
                      }
                    ],
                    "Name": "Example Name",
                    "CorrespondenceName": "Example Correspondence Name",
                    "FirstName": "Test",
                    "LastName": "Contact",
                    "Email": "mail@sample.com",
                    "UpdatedDateTime": "0001-01-01T00:00:00",
                    "Category": "Owner",
                    "Status": "Approved",
                    "FaxPhone": {
                      "Number": "2365555",
                      "AreaCode": "111",
                      "CountryCode": "222"
                    },
                    "MobilePhone": {
                      "Number": "2365555",
                      "AreaCode": "111",
                      "CountryCode": "222"
                    },
                    "DirectDialPhone": {
                      "Number": "2365555",
                      "AreaCode": "111",
                      "CountryCode": "222"
                    },
                    "TelephoneNumber": {
                      "Number": "2365555",
                      "AreaCode": "111",
                      "CountryCode": "222"
                    },
                    "PhysicalAddress": {
                      "StreetAddress": "123 Main Street",
                      "Suburb": "Sydney",
                      "TownCity": "Sydney",
                      "Region": "NSW",
                      "PostCode": "7005",
                      "CountryCode": "PA",
                      "CountryName": "Panama"
                    },
                    "PostalAddress": {
                      "StreetAddress": "123 Main Street",
                      "Suburb": "Sydney",
                      "TownCity": "Sydney",
                      "Region": "NSW",
                      "PostCode": "7005",
                      "CountryCode": "PA",
                      "CountryName": "Panama"
                    },
                    "TaxBusinessNumber": "123456789",
                    "TaxNumber": "123456789",
                    "PaymentMethod": "EFT",
                    "BankAccounts": [
                      {
                        "DisplayName": "Owner Operating Account",
                        "AccountNumber": "12-3456-7890123-00",
                        "IsDefault": true
                      }
                    ],
                    "OwnerDisbursementAccount": "1000",
                    "DisbursementProfileIds": [
                      "00000000-0000-0000-0000-000000000000"
                    ],
                    "CustomFields": [
                      {
                        "FieldIdentifier": "account-manager",
                        "Label": "Account Manager",
                        "Type": "String",
                        "Value": "Jane Smith"
                      },
                      {
                        "FieldIdentifier": "credit-limit",
                        "Label": "Credit Limit",
                        "Type": "Decimal",
                        "Value": 50000.0
                      },
                      {
                        "FieldIdentifier": "preferred-contact-method",
                        "Label": "Preferred Contact Method",
                        "Type": "Dropdown",
                        "Value": "Email"
                      }
                    ],
                    "Tags": [
                      "commercial",
                      "priority"
                    ]
                  }
                ],
                "MetaData": {
                  "NextPageUrl": "/api/contacts?companyId=fb161bb1-a259-4e77-b603-ebedff778998&fromId=66bf6a0e-fe5f-494a-af7a-686d8d050b94"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Contacts"
        ],
        "summary": "Updates a contact",
        "description": "Scope required: Contacts\r\nProduction Endpoint: https://api.re-leased.com/api/contact",
        "operationId": "Contacts_Put",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "updateContactRequest",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateContactRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "6d738531-b88c-4586-b48c-82b3968cd125"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Result"
            },
            "examples": {
              "application/json": {
                "Data": {
                  "Id": "00000000-0000-0000-0000-000000000000",
                  "CompanyMaps": [
                    {
                      "Id": "00000000-0000-0000-0000-000000000000",
                      "IsActive": false
                    }
                  ],
                  "Name": "Example Name",
                  "CorrespondenceName": "Example Correspondence Name",
                  "FirstName": "Test",
                  "LastName": "Contact",
                  "Email": "mail@sample.com",
                  "UpdatedDateTime": "0001-01-01T00:00:00",
                  "Category": "Owner",
                  "Status": "Approved",
                  "FaxPhone": {
                    "Number": "2365555",
                    "AreaCode": "111",
                    "CountryCode": "222"
                  },
                  "MobilePhone": {
                    "Number": "2365555",
                    "AreaCode": "111",
                    "CountryCode": "222"
                  },
                  "DirectDialPhone": {
                    "Number": "2365555",
                    "AreaCode": "111",
                    "CountryCode": "222"
                  },
                  "TelephoneNumber": {
                    "Number": "2365555",
                    "AreaCode": "111",
                    "CountryCode": "222"
                  },
                  "PhysicalAddress": {
                    "StreetAddress": "123 Main Street",
                    "Suburb": "Sydney",
                    "TownCity": "Sydney",
                    "Region": "NSW",
                    "PostCode": "7005",
                    "CountryCode": "PA",
                    "CountryName": "Panama"
                  },
                  "PostalAddress": {
                    "StreetAddress": "123 Main Street",
                    "Suburb": "Sydney",
                    "TownCity": "Sydney",
                    "Region": "NSW",
                    "PostCode": "7005",
                    "CountryCode": "PA",
                    "CountryName": "Panama"
                  },
                  "TaxBusinessNumber": "123456789",
                  "TaxNumber": "123456789",
                  "PaymentMethod": "EFT",
                  "BankAccounts": [
                    {
                      "DisplayName": "Owner Operating Account",
                      "AccountNumber": "12-3456-7890123-00",
                      "IsDefault": true
                    }
                  ],
                  "OwnerDisbursementAccount": "1000",
                  "DisbursementProfileIds": [
                    "00000000-0000-0000-0000-000000000000"
                  ],
                  "CustomFields": [
                    {
                      "FieldIdentifier": "account-manager",
                      "Label": "Account Manager",
                      "Type": "String",
                      "Value": "Jane Smith"
                    },
                    {
                      "FieldIdentifier": "credit-limit",
                      "Label": "Credit Limit",
                      "Type": "Decimal",
                      "Value": 50000.0
                    },
                    {
                      "FieldIdentifier": "preferred-contact-method",
                      "Label": "Preferred Contact Method",
                      "Type": "Dropdown",
                      "Value": "Email"
                    }
                  ],
                  "Tags": [
                    "commercial",
                    "priority"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Creates a contact",
        "description": "Scope required: Contacts\r\n<br /><br /><b>Request header</b>: A new <i>Idempotency-key</i> should be supplied with every POST request irrespective of the response type of the submitted contact.<br />\r\nIf the contact is successfully created and the same <i>Idempotency-key</i> is used in subsequent requests, the response returned will be the same contact created the first time.\r\n<i>Idempotency-key</i> can be a string or Guid.\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/contact",
        "operationId": "Contacts_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "createContactRequest",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateContactRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "1608731a-b0de-40d9-9dbd-9f4955e495d4"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ContactResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": {
                  "Id": "00000000-0000-0000-0000-000000000000",
                  "CompanyMaps": [
                    {
                      "Id": "00000000-0000-0000-0000-000000000000",
                      "IsActive": false
                    }
                  ],
                  "Name": "Example Name",
                  "CorrespondenceName": "Example Correspondence Name",
                  "FirstName": "Test",
                  "LastName": "Contact",
                  "Email": "mail@sample.com",
                  "UpdatedDateTime": "0001-01-01T00:00:00",
                  "Category": "Owner",
                  "Status": "Approved",
                  "FaxPhone": {
                    "Number": "2365555",
                    "AreaCode": "111",
                    "CountryCode": "222"
                  },
                  "MobilePhone": {
                    "Number": "2365555",
                    "AreaCode": "111",
                    "CountryCode": "222"
                  },
                  "DirectDialPhone": {
                    "Number": "2365555",
                    "AreaCode": "111",
                    "CountryCode": "222"
                  },
                  "TelephoneNumber": {
                    "Number": "2365555",
                    "AreaCode": "111",
                    "CountryCode": "222"
                  },
                  "PhysicalAddress": {
                    "StreetAddress": "123 Main Street",
                    "Suburb": "Sydney",
                    "TownCity": "Sydney",
                    "Region": "NSW",
                    "PostCode": "7005",
                    "CountryCode": "PA",
                    "CountryName": "Panama"
                  },
                  "PostalAddress": {
                    "StreetAddress": "123 Main Street",
                    "Suburb": "Sydney",
                    "TownCity": "Sydney",
                    "Region": "NSW",
                    "PostCode": "7005",
                    "CountryCode": "PA",
                    "CountryName": "Panama"
                  },
                  "TaxBusinessNumber": "123456789",
                  "TaxNumber": "123456789",
                  "PaymentMethod": "EFT",
                  "BankAccounts": [
                    {
                      "DisplayName": "Owner Operating Account",
                      "AccountNumber": "12-3456-7890123-00",
                      "IsDefault": true
                    }
                  ],
                  "OwnerDisbursementAccount": "1000",
                  "DisbursementProfileIds": [
                    "00000000-0000-0000-0000-000000000000"
                  ],
                  "CustomFields": [
                    {
                      "FieldIdentifier": "account-manager",
                      "Label": "Account Manager",
                      "Type": "String",
                      "Value": "Jane Smith"
                    },
                    {
                      "FieldIdentifier": "credit-limit",
                      "Label": "Credit Limit",
                      "Type": "Decimal",
                      "Value": 50000.0
                    },
                    {
                      "FieldIdentifier": "preferred-contact-method",
                      "Label": "Preferred Contact Method",
                      "Type": "Dropdown",
                      "Value": "Email"
                    }
                  ],
                  "Tags": [
                    "commercial",
                    "priority"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/contacts/{id}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Retrieve a single contact by id",
        "description": "Retrieves a single contact by id for the authorised user.\r\n<br /><br />\r\nScope required: Contacts\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/contacts/{id}",
        "operationId": "Contacts_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the contact",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "9d0bcbce-25b2-465d-b93a-dd4d1bf49749"
          },
          {
            "name": "includeCustomFields",
            "in": "query",
            "description": "Includes custom field values for the contact in the response. Only fields with a value are returned; empty when the company has no custom fields subscription.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "includeTags",
            "in": "query",
            "description": "Includes the names of the active tags assigned to the contact in the response. Tags are shared across the company's billing group, so a tag assigned by a sibling company is included.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ContactResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": {
                  "Id": "00000000-0000-0000-0000-000000000000",
                  "CompanyMaps": [
                    {
                      "Id": "00000000-0000-0000-0000-000000000000",
                      "IsActive": false
                    }
                  ],
                  "Name": "Example Name",
                  "CorrespondenceName": "Example Correspondence Name",
                  "FirstName": "Test",
                  "LastName": "Contact",
                  "Email": "mail@sample.com",
                  "UpdatedDateTime": "0001-01-01T00:00:00",
                  "Category": "Owner",
                  "Status": "Approved",
                  "FaxPhone": {
                    "Number": "2365555",
                    "AreaCode": "111",
                    "CountryCode": "222"
                  },
                  "MobilePhone": {
                    "Number": "2365555",
                    "AreaCode": "111",
                    "CountryCode": "222"
                  },
                  "DirectDialPhone": {
                    "Number": "2365555",
                    "AreaCode": "111",
                    "CountryCode": "222"
                  },
                  "TelephoneNumber": {
                    "Number": "2365555",
                    "AreaCode": "111",
                    "CountryCode": "222"
                  },
                  "PhysicalAddress": {
                    "StreetAddress": "123 Main Street",
                    "Suburb": "Sydney",
                    "TownCity": "Sydney",
                    "Region": "NSW",
                    "PostCode": "7005",
                    "CountryCode": "PA",
                    "CountryName": "Panama"
                  },
                  "PostalAddress": {
                    "StreetAddress": "123 Main Street",
                    "Suburb": "Sydney",
                    "TownCity": "Sydney",
                    "Region": "NSW",
                    "PostCode": "7005",
                    "CountryCode": "PA",
                    "CountryName": "Panama"
                  },
                  "TaxBusinessNumber": "123456789",
                  "TaxNumber": "123456789",
                  "PaymentMethod": "EFT",
                  "BankAccounts": [
                    {
                      "DisplayName": "Owner Operating Account",
                      "AccountNumber": "12-3456-7890123-00",
                      "IsDefault": true
                    }
                  ],
                  "OwnerDisbursementAccount": "1000",
                  "DisbursementProfileIds": [
                    "00000000-0000-0000-0000-000000000000"
                  ],
                  "CustomFields": [
                    {
                      "FieldIdentifier": "account-manager",
                      "Label": "Account Manager",
                      "Type": "String",
                      "Value": "Jane Smith"
                    },
                    {
                      "FieldIdentifier": "credit-limit",
                      "Label": "Credit Limit",
                      "Type": "Decimal",
                      "Value": 50000.0
                    },
                    {
                      "FieldIdentifier": "preferred-contact-method",
                      "Label": "Preferred Contact Method",
                      "Type": "Dropdown",
                      "Value": "Email"
                    }
                  ],
                  "Tags": [
                    "commercial",
                    "priority"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/credit-notes": {
      "get": {
        "tags": [
          "CreditNotes"
        ],
        "summary": "Retrieve a list of credit notes",
        "description": "Retrieves a list of credit notes\r\n<br /><br />\r\nScope required: creditnotes\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/credit-notes",
        "operationId": "CreditNotes_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "fromId",
            "in": "query",
            "description": "Gets credit notes from specified id",
            "required": false,
            "type": "string"
          },
          {
            "name": "updatedAfterDate",
            "in": "query",
            "description": "Gets credit notes updated after the specified date (UTC). E.g. 2024-02-07T20:40:38",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CreditNotesResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": [
                  {
                    "Id": "b4565045-7154-4da5-9d60-f9f93ad94799",
                    "DisplayId": "62529",
                    "Contact": {
                      "Id": "c3359974-dea4-4fe1-b900-08a6f113a7c5",
                      "Name": "Clark Kent"
                    },
                    "Date": "2026-11-15T11:56:47.1951068Z",
                    "Status": "AUTHORISED",
                    "LineAmountTypes": "Exclusive",
                    "SubTotal": 1000.0,
                    "TotalTax": 100.0,
                    "Total": 1100.0,
                    "Reference": "Waive documentation fee",
                    "RemainingCredit": 400.0,
                    "Type": "ACCPAYCREDIT",
                    "Property": {
                      "Id": "c5d27fdf-5458-40fb-9505-0f99a7c3c3f9",
                      "Title": "Tech collective",
                      "Tenancy": {
                        "Id": "faf9d329-1e0f-45d5-a893-bd38881397e7",
                        "Title": "2022 contract"
                      }
                    },
                    "LineItems": [
                      {
                        "Id": "1eb45ff9-510b-4aae-8cf0-39a809bad7ed",
                        "Description": "Document fee",
                        "Quantity": 1.0,
                        "UnitAmount": 1000.0,
                        "TaxAmount": 100.0,
                        "TaxType": "INPUT2",
                        "AccountCode": "960",
                        "Tracking": [
                          {
                            "Category": "Tracking Category",
                            "Option": "Tracking Category 1"
                          }
                        ]
                      }
                    ],
                    "Allocations": [
                      {
                        "Id": "892012a3-6844-4ffb-a858-85af7c4790d6",
                        "Amount": 600.0,
                        "Invoice": {
                          "Id": "8bf6a719-d18c-41bc-bc49-07a1b2df94bb",
                          "DisplayId": "INV-0042",
                          "Status": "AUTHORISED",
                          "AmountDue": 900.0,
                          "Total": 1000.0
                        }
                      }
                    ],
                    "UpdatedDate": "2026-11-15T11:56:47.1951068Z"
                  }
                ],
                "MetaData": {
                  "NextPageUrl": "/api/credit-notes?fromId=a552932d-079a-4b1c-8db8-faeba1a05b51"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "put": {
        "tags": [
          "CreditNotes"
        ],
        "summary": "Update a credit note",
        "description": "Update a credit note with the given details\r\n<br /><br />\r\nScope required: creditnotes\r\n<br /><br /><br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/credit-notes",
        "operationId": "CreditNotes_Put",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateCreditNoteRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "7e2297cd-02e9-4997-94ac-883fa86f7489"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CreditNoteModel"
            },
            "examples": {
              "application/json": {
                "Data": {
                  "Id": "67151c24-36ca-4fec-958e-b1e9b5d2c7e9",
                  "DisplayId": "62529",
                  "Contact": {
                    "Id": "d15b991e-6d32-47f0-92d4-9e2c45eed589",
                    "Name": "Clark Kent"
                  },
                  "Date": "2026-11-15T11:56:47.1951068Z",
                  "Status": "AUTHORISED",
                  "LineAmountTypes": "Exclusive",
                  "SubTotal": 1000.0,
                  "TotalTax": 100.0,
                  "Total": 1100.0,
                  "Reference": "Waive documentation fee",
                  "RemainingCredit": 400.0,
                  "Type": "ACCPAYCREDIT",
                  "Property": {
                    "Id": "53959d47-d8f1-4efa-ae53-1456c96a4817",
                    "Title": "Tech collective",
                    "Tenancy": {
                      "Id": "8a161536-f186-4122-a87f-c1a6b9462dee",
                      "Title": "2022 contract"
                    }
                  },
                  "LineItems": [
                    {
                      "Id": "8e68da82-04a2-4c90-86d5-eab3490ef4d5",
                      "Description": "Document fee",
                      "Quantity": 1.0,
                      "UnitAmount": 1000.0,
                      "TaxAmount": 100.0,
                      "TaxType": "INPUT2",
                      "AccountCode": "960",
                      "Tracking": [
                        {
                          "Category": "Tracking Category",
                          "Option": "Tracking Category 1"
                        }
                      ]
                    }
                  ],
                  "Allocations": [
                    {
                      "Id": "3e6e78e4-73e7-4683-9bd1-326bd7b463f2",
                      "Amount": 600.0,
                      "Invoice": {
                        "Id": "e3598103-6426-4bce-97d7-4b34f259fe0d",
                        "DisplayId": "INV-0042",
                        "Status": "AUTHORISED",
                        "AmountDue": 900.0,
                        "Total": 1000.0
                      }
                    }
                  ],
                  "UpdatedDate": "2026-11-15T11:56:47.1951068Z"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "post": {
        "tags": [
          "CreditNotes"
        ],
        "summary": "Create a credit note",
        "description": "Create an new credit note with the given details\r\n<br /><br />\r\nScope required: creditnotes\r\n<br /><br /><b>Request header</b>: A new <i>Idempotency-key</i> should be supplied with every POST request irrespective of the response type of the submitted credit note.<br />\r\nIf the credit note is successfully created and the same <i>Idempotency-key</i> is used in subsequent requests, the response returned will be the same credit note created the first time.\r\n<i>Idempotency-key</i> can be a string or Guid.\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/credit-notes",
        "operationId": "CreditNotes_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "createCreditNoteRequest",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateCreditNoteRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "058e9122-cdad-414a-ac0d-c71ff181feae"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CreditNoteModel"
            },
            "examples": {
              "application/json": {
                "Data": {
                  "Id": "fe4ea75e-6590-416b-b69b-3d8e057acb2e",
                  "DisplayId": "62529",
                  "Contact": {
                    "Id": "a3bebadd-83d5-4fb5-b7f5-3f097005b494",
                    "Name": "Clark Kent"
                  },
                  "Date": "2026-11-15T11:56:47.1951068Z",
                  "Status": "AUTHORISED",
                  "LineAmountTypes": "Exclusive",
                  "SubTotal": 1000.0,
                  "TotalTax": 100.0,
                  "Total": 1100.0,
                  "Reference": "Waive documentation fee",
                  "RemainingCredit": 400.0,
                  "Type": "ACCPAYCREDIT",
                  "Property": {
                    "Id": "81e15640-3f2d-4cb8-9219-b3b31fd35d17",
                    "Title": "Tech collective",
                    "Tenancy": {
                      "Id": "d5721463-1886-4577-a40b-51835d8a7e3a",
                      "Title": "2022 contract"
                    }
                  },
                  "LineItems": [
                    {
                      "Id": "a068fd7b-59ea-41f1-b00d-9d2e714214e9",
                      "Description": "Document fee",
                      "Quantity": 1.0,
                      "UnitAmount": 1000.0,
                      "TaxAmount": 100.0,
                      "TaxType": "INPUT2",
                      "AccountCode": "960",
                      "Tracking": [
                        {
                          "Category": "Tracking Category",
                          "Option": "Tracking Category 1"
                        }
                      ]
                    }
                  ],
                  "Allocations": [
                    {
                      "Id": "7fd98ad5-be73-4c4b-8388-b44b934eaa2d",
                      "Amount": 600.0,
                      "Invoice": {
                        "Id": "7d816d5b-18bc-4af0-81f6-4c6bc8e944c9",
                        "DisplayId": "INV-0042",
                        "Status": "AUTHORISED",
                        "AmountDue": 900.0,
                        "Total": 1000.0
                      }
                    }
                  ],
                  "UpdatedDate": "2026-11-15T11:56:47.1951068Z"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/credit-notes/{id}": {
      "get": {
        "tags": [
          "CreditNotes"
        ],
        "summary": "Retrieve a single credit note",
        "description": "Retrieves a single credit note for supplied id\r\n<br /><br />\r\nScope required: creditnotes\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/credit-notes/{id}",
        "operationId": "CreditNotes_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Credit note id",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "54b15823-b136-4431-9ef5-64dc2065b7dd"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CreditNoteResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": {
                  "Id": "2620b158-0427-492d-a990-343e7834e134",
                  "DisplayId": "62529",
                  "Contact": {
                    "Id": "7ab96051-f8cf-4ba6-ace7-789873584d73",
                    "Name": "Clark Kent"
                  },
                  "Date": "2026-11-15T11:56:47.1951068Z",
                  "Status": "AUTHORISED",
                  "LineAmountTypes": "Exclusive",
                  "SubTotal": 1000.0,
                  "TotalTax": 100.0,
                  "Total": 1100.0,
                  "Reference": "Waive documentation fee",
                  "RemainingCredit": 400.0,
                  "Type": "ACCPAYCREDIT",
                  "Property": {
                    "Id": "86a141a3-06ae-4fdb-9dc8-05e934bd7eaa",
                    "Title": "Tech collective",
                    "Tenancy": {
                      "Id": "8c5943ba-d18c-416d-b79e-648d9fd70c5e",
                      "Title": "2022 contract"
                    }
                  },
                  "LineItems": [
                    {
                      "Id": "690729d4-4a92-4c5b-9e28-7dc507bf7bf5",
                      "Description": "Document fee",
                      "Quantity": 1.0,
                      "UnitAmount": 1000.0,
                      "TaxAmount": 100.0,
                      "TaxType": "INPUT2",
                      "AccountCode": "960",
                      "Tracking": [
                        {
                          "Category": "Tracking Category",
                          "Option": "Tracking Category 1"
                        }
                      ]
                    }
                  ],
                  "Allocations": [
                    {
                      "Id": "6726d276-077b-4df6-878a-c8ba060310d2",
                      "Amount": 600.0,
                      "Invoice": {
                        "Id": "a1cc21e0-49df-43a3-9b2c-e3c3fd53f025",
                        "DisplayId": "INV-0042",
                        "Status": "AUTHORISED",
                        "AmountDue": 900.0,
                        "Total": 1000.0
                      }
                    }
                  ],
                  "UpdatedDate": "2026-11-15T11:56:47.1951068Z"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/credit-notes/{id}/allocations": {
      "post": {
        "tags": [
          "CreditNotes"
        ],
        "summary": "Allocate a credit note",
        "description": "Allocate a credit note to invoices\r\n<br /><br />\r\nScope required: creditnotes\r\n<br /><br /><b>Request header</b>: A new <i>Idempotency-key</i> should be supplied with every POST request irrespective of the response type of the submitted request.<br />\r\nIf the credit note is successfully allocated and the same <i>Idempotency-key</i> is used in subsequent requests, the response returned will be the same allocations applied in the first time.\r\n<i>Idempotency-key</i> can be a string or Guid.\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/credit-notes/{id}/allocations",
        "operationId": "CreditNotes_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "default": "a0877ed7-ca37-43ec-bd01-887f19d27635"
          },
          {
            "name": "allocateCreditNoteRequest",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AllocateCreditNoteRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "cda902d4-cf94-4f66-b919-43b210e25705"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CreditNoteModel"
            },
            "examples": {
              "application/json": {
                "Data": {
                  "Id": "8d41d81b-49e7-4d66-86da-4a8df3b14060",
                  "DisplayId": "62529",
                  "Contact": {
                    "Id": "932cc833-7357-4010-a8f1-052a4b685954",
                    "Name": "Clark Kent"
                  },
                  "Date": "2026-11-15T11:56:47.1951068Z",
                  "Status": "AUTHORISED",
                  "LineAmountTypes": "Exclusive",
                  "SubTotal": 1000.0,
                  "TotalTax": 100.0,
                  "Total": 1100.0,
                  "Reference": "Waive documentation fee",
                  "RemainingCredit": 400.0,
                  "Type": "ACCPAYCREDIT",
                  "Property": {
                    "Id": "c307af83-92dd-460f-8b1b-84b0cece147d",
                    "Title": "Tech collective",
                    "Tenancy": {
                      "Id": "27695072-f5ce-4b0f-8c65-8d478af5565c",
                      "Title": "2022 contract"
                    }
                  },
                  "LineItems": [
                    {
                      "Id": "6fd281e2-a11f-494b-92d2-5d06d26fcf31",
                      "Description": "Document fee",
                      "Quantity": 1.0,
                      "UnitAmount": 1000.0,
                      "TaxAmount": 100.0,
                      "TaxType": "INPUT2",
                      "AccountCode": "960",
                      "Tracking": [
                        {
                          "Category": "Tracking Category",
                          "Option": "Tracking Category 1"
                        }
                      ]
                    }
                  ],
                  "Allocations": [
                    {
                      "Id": "c8f6be75-da98-4456-931c-bb7ef65ce02d",
                      "Amount": 600.0,
                      "Invoice": {
                        "Id": "ac3a952f-5027-41ca-88bc-ea2cd0e3262c",
                        "DisplayId": "INV-0042",
                        "Status": "AUTHORISED",
                        "AmountDue": 900.0,
                        "Total": 1000.0
                      }
                    }
                  ],
                  "UpdatedDate": "2026-11-15T11:56:47.1951068Z"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "CreditNotes"
        ],
        "summary": "Un-allocate a credit note",
        "description": "Un-allocate a credit note to invoices\r\n<br /><br />\r\nScope required: creditnotes\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/credit-notes/{id}/allocations",
        "operationId": "CreditNotes_Delete",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "default": "883c12da-ba3f-446b-8fa6-70ff7d72e1d5"
          },
          {
            "name": "unAllocateCreditNoteRequest",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UnAllocateCreditNoteRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "9baa7c1a-508a-45e4-8abe-bf8b716cb34c"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CreditNoteModel"
            },
            "examples": {
              "application/json": {
                "Data": {
                  "Id": "3bd2004a-729b-41b4-bc1b-2e79905456d9",
                  "DisplayId": "62529",
                  "Contact": {
                    "Id": "6c94ea4e-548e-4b44-9b2a-74410a8ae526",
                    "Name": "Clark Kent"
                  },
                  "Date": "2026-11-15T11:56:47.1951068Z",
                  "Status": "AUTHORISED",
                  "LineAmountTypes": "Exclusive",
                  "SubTotal": 1000.0,
                  "TotalTax": 100.0,
                  "Total": 1100.0,
                  "Reference": "Waive documentation fee",
                  "RemainingCredit": 400.0,
                  "Type": "ACCPAYCREDIT",
                  "Property": {
                    "Id": "abc75430-c20c-4473-bce1-8e9128eb3658",
                    "Title": "Tech collective",
                    "Tenancy": {
                      "Id": "68e469dd-9fef-4a7e-9918-dce4d103067b",
                      "Title": "2022 contract"
                    }
                  },
                  "LineItems": [
                    {
                      "Id": "2cc4a83a-8085-44f9-a557-849e8a1c8145",
                      "Description": "Document fee",
                      "Quantity": 1.0,
                      "UnitAmount": 1000.0,
                      "TaxAmount": 100.0,
                      "TaxType": "INPUT2",
                      "AccountCode": "960",
                      "Tracking": [
                        {
                          "Category": "Tracking Category",
                          "Option": "Tracking Category 1"
                        }
                      ]
                    }
                  ],
                  "Allocations": [
                    {
                      "Id": "9dd19380-cfed-4198-9ec2-17964a131a7c",
                      "Amount": 600.0,
                      "Invoice": {
                        "Id": "2382de7e-c528-4c6a-97c3-0e0876a8a73c",
                        "DisplayId": "INV-0042",
                        "Status": "AUTHORISED",
                        "AmountDue": 900.0,
                        "Total": 1000.0
                      }
                    }
                  ],
                  "UpdatedDate": "2026-11-15T11:56:47.1951068Z"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/disbursement-profiles": {
      "get": {
        "tags": [
          "DisbursementProfiles"
        ],
        "summary": "Retrieve a list of disbursement profiles",
        "description": "Returns the active disbursement profiles configured for the supplied company. Use the returned Id values as DisbursementProfileIds when creating an Owner contact via POST /api/contacts.\r\n<br /><br />\r\nScope required: Contacts\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/disbursement-profiles",
        "operationId": "DisbursementProfiles_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "description": "Company id for the disbursement profiles",
            "required": true,
            "type": "string",
            "default": "fafb848a-bbca-4f3b-ba92-280ec60ab579"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/DisbursementProfileResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": [
                  {
                    "Id": "11111111-1111-1111-1111-111111111111",
                    "Name": "Monthly Statement"
                  },
                  {
                    "Id": "22222222-2222-2222-2222-222222222222",
                    "Name": "End of Month"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Health"
        ],
        "operationId": "Health_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/api/Inspections": {
      "get": {
        "tags": [
          "Inspections"
        ],
        "summary": "Retrieve a list of inspections",
        "description": "Retrieves a list of recent and upcoming inspections for the authorised user. Filtered automatically to include only inspections which occur in the past and next 15 days.\r\n<br /><br />\r\nScope required: inspections\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/inspections",
        "operationId": "Inspections_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "isComplete",
            "in": "query",
            "description": "Indicates whether to include only completed inspections",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "includeTags",
            "in": "query",
            "description": "Includes the names of the active tags assigned to each inspection, and to the property and tenancy attached to it, in the response. Tags are shared across the company's billing group, so a tag assigned by a sibling company is included.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/InspectionDataModel"
            },
            "examples": {
              "application/json": {
                "Inspections": [
                  {
                    "GlobalIdentifier": "594347ee-5e26-4b14-ba10-362dd8a62e2e",
                    "UserTimeZone": "New Zealand Standard Time",
                    "FromDateUtc": "2026-11-15T11:56:47.2263538Z",
                    "FromDateLocal": "2026-11-15T11:56:47.2263538Z",
                    "ToDateUtc": "2026-11-15T13:56:47.2263538Z",
                    "ToDateLocal": "2026-11-15T13:56:47.2263538Z",
                    "Type": "Start",
                    "Category": "Routine",
                    "IsComplete": true,
                    "Description": "Routine inspection to be carried out.",
                    "Notes": "Check behind fridge",
                    "Property": {
                      "Company": {
                        "GlobalIdentifier": "6648432e-0ad3-4c18-8a5f-a94f0d81e028",
                        "Name": "Snow Industries",
                        "Address": "King Street, Albany Auckland 1000, New Zealand",
                        "Street": "King Street",
                        "TownCity": "Albany",
                        "StateRegion": "Auckland",
                        "PostZipCode": "1000",
                        "Country": "New Zealand",
                        "LogoUrl": "https://us1.re-leased.com/photostream/GetLogo?imageName=5000.png",
                        "CompanyId": 100
                      },
                      "PropertyKeys": [
                        {
                          "Reference": "Key 001",
                          "Description": "Key Rack 2"
                        }
                      ],
                      "Areas": [
                        {
                          "AreaId": 1,
                          "AreaTypeId": 1,
                          "AreaTypeName": "Office",
                          "AreaTitle": "Ground Floor Office",
                          "AreaEpcRating": "B",
                          "AreaSize": 150.5,
                          "TenancyId": 0,
                          "TenancyGlobalIdentifier": "454e9b76-c18f-4935-8803-bd918aff0caa"
                        }
                      ],
                      "RatingValuations": null,
                      "EpcRating": null,
                      "PropertyGroup": {
                        "Id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                        "Title": "Downtown Portfolio"
                      },
                      "IsCommonProperty": false,
                      "CustomFields": [
                        {
                          "FieldIdentifier": "insurance-provider",
                          "Label": "Insurance Provider",
                          "Type": "String",
                          "Value": "AIG"
                        },
                        {
                          "FieldIdentifier": "roof-area-m2",
                          "Label": "Roof Area m2",
                          "Type": "Decimal",
                          "Value": 1250.5
                        },
                        {
                          "FieldIdentifier": "has-sprinklers",
                          "Label": "Has Sprinklers",
                          "Type": "Boolean",
                          "Value": true
                        },
                        {
                          "FieldIdentifier": "last-fire-inspection",
                          "Label": "Last Fire Inspection",
                          "Type": "DateTime",
                          "Value": "2026-03-14T00:00:00Z"
                        },
                        {
                          "FieldIdentifier": "heating-type",
                          "Label": "Heating Type",
                          "Type": "Dropdown",
                          "Value": "Heat Pump"
                        },
                        {
                          "FieldIdentifier": "compliance-certificates",
                          "Label": "Compliance Certificates",
                          "Type": "MultiSelectDropdown",
                          "Value": [
                            "Asbestos",
                            "Electrical"
                          ]
                        }
                      ],
                      "Tags": [
                        "commercial",
                        "firesafety"
                      ],
                      "GlobalIdentifier": "5d1c3b9a-ecea-44fc-892b-1da737e5a367",
                      "UpdatedDate": "0001-01-01T00:00:00",
                      "IsArchived": false,
                      "Status": "Active",
                      "CountryIsoCode": "NZ",
                      "VatElectedType": null,
                      "VatEffectiveDate": null,
                      "Manager": null,
                      "UsageType": null,
                      "CustomReference": null,
                      "Name": "South Office",
                      "ManagerGlobalIdentifier": "011369b7-1ace-4493-b370-0638a56adc0b",
                      "ManagerFirstName": "John",
                      "ManagerLastName": "Snow",
                      "ManagerEmail": "JohnSnow@email.com",
                      "ManagerPhoneNumber": "09 9705526",
                      "ManagerMobilePhoneNumber": "027 22545502",
                      "Address": "1 / 500 High Street, Ahuriri, Napier Hawkes Bay 4000, New Zealand",
                      "Type": "Office",
                      "Longitude": "147.25382409999997",
                      "Latitude": "-42.79149899999999",
                      "ImageUrl": "https://us1.re-leased.com/photostream/Get?imageName=100.jpg&imageSize=full",
                      "OwnerGlobalIdentifier": "24850c75-a62e-41d7-b96e-f7c0824ad345",
                      "OwnerName": "B Smith",
                      "OwnerFirstName": "Bill",
                      "OwnerLastName": "Smith",
                      "OwnerEmail": "billsmith@email.com",
                      "OwnerPhoneNumber": "09 910545",
                      "OwnerMobilePhoneNumber": "027 45684651",
                      "PropertyId": 100,
                      "ManagerId": 200,
                      "OwnerId": 100,
                      "FlatNumber": "1",
                      "StreetNumber": "500",
                      "Street": "High Street",
                      "Suburb": "Ahuriri",
                      "TownCity": "Napier",
                      "StateRegion": "Hawkes Bay",
                      "PostZipCode": "4000",
                      "Country": "New Zealand",
                      "DateOfPurchase": null,
                      "PurchasePrice": null,
                      "LandArea": null,
                      "FloorArea": null,
                      "NumberOfBedrooms": 4,
                      "NumberOfBathrooms": 2.0,
                      "AllowsPets": false,
                      "AllowsSmoking": null,
                      "AllowsUnattendedInspections": null,
                      "IsFurnished": null
                    },
                    "Tenancy": {
                      "GlobalIdentifier": "86604999-7503-476b-9e8c-c9edcfc43b02",
                      "PropertyGlobalIdentifier": "68b6a370-2d71-40b0-ac03-d8c833048215",
                      "Name": "Office",
                      "StartDateUtc": "2026-11-15T11:56:47.2263538Z",
                      "IsActive": true,
                      "Status": "Active",
                      "RentInclusive": false,
                      "LeaseType": {
                        "Id": 10,
                        "Name": "Commercial"
                      },
                      "IndustryType": {
                        "Id": 25,
                        "Name": "Retail"
                      },
                      "IsInsideTheLandlordAndTenantAct": true,
                      "EndDateUtc": "2027-11-15T11:56:47.2263538Z",
                      "RentFrequencyLength": 1,
                      "RentFrequencyUnit": "Weeks",
                      "RentFrequencyAmount": 630.0,
                      "RentFrequencyAmountExcludingOpex": 600.0,
                      "AnnualRentAmount": 32760.0,
                      "RentPaidToUtc": "2027-04-14T11:56:47.2263538Z",
                      "RentPartPayment": 0.0,
                      "Tenants": [
                        {
                          "GlobalIdentifier": "00000000-0000-0000-0000-000000000000",
                          "Name": "Smith Industries",
                          "FirstName": "Bob",
                          "LastName": "Smith",
                          "MobileNumber": "+64 27 5458842",
                          "PhoneNumber": "+64 9 8745412",
                          "Email": "BobSmith@email.com",
                          "TenantId": 0
                        }
                      ],
                      "Areas": [
                        {
                          "AreaId": 100,
                          "AreaTitle": "Office"
                        }
                      ],
                      "Terms": [],
                      "Breaks": [
                        {
                          "Id": 1,
                          "LeaseBreakTypeId": 4,
                          "Title": "Year-5 break",
                          "Description": "Tenant option to break at year 5",
                          "Notes": "Six months' written notice required",
                          "Occurrences": [
                            {
                              "Id": 1,
                              "BreakDateUtc": "2031-11-15T11:56:47.2263538Z",
                              "FinalNotificationDateUtc": "2031-05-15T11:56:47.2263538Z",
                              "NoticeServedDateUtc": null,
                              "CompletedDateUtc": null,
                              "IsRollingBreak": false,
                              "Status": "Active"
                            }
                          ]
                        }
                      ],
                      "CurrentReview": {
                        "Id": 1,
                        "ReviewDateUtc": "2027-11-15T11:56:47.2263538Z",
                        "IsComplete": false,
                        "ReviewType": {
                          "Id": 7,
                          "Name": "CPI"
                        }
                      },
                      "Clause": null,
                      "NoticeToVacate": null,
                      "UpdatedDate": "2026-11-15T11:56:47.2263538Z",
                      "TenancyId": 500,
                      "PropertyId": 100,
                      "CustomFields": [
                        {
                          "FieldIdentifier": "use-class",
                          "Label": "Use Class",
                          "Type": "Dropdown",
                          "Value": "E (Commercial / Business / Service)"
                        },
                        {
                          "FieldIdentifier": "inside-lt-act",
                          "Label": "Inside L&T Act",
                          "Type": "Boolean",
                          "Value": true
                        },
                        {
                          "FieldIdentifier": "lease-notes",
                          "Label": "Lease Notes",
                          "Type": "String",
                          "Value": "Renewed early at tenant request"
                        }
                      ],
                      "Tags": [
                        "arrears",
                        "renewal"
                      ],
                      "Notes": "Tenant has first right of refusal on the adjoining unit.",
                      "ArrearsStatus": {
                        "Id": 3,
                        "Name": "Payment Plan"
                      }
                    },
                    "InspectionId": 100,
                    "AreaId": null,
                    "DelegatedUserId": null,
                    "DelegatedUserGlobalIdentifier": null,
                    "Frequency": 10,
                    "FrequencyType": "Weeks",
                    "DelegatedUserEmail": null,
                    "Url": "https://re-leased.com",
                    "Tags": []
                  }
                ]
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Inspections"
        ],
        "summary": "Update an inspection",
        "description": "Update an inspection with the given details.\r\n<br /><br />\r\nScope required: inspections\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/inspections",
        "operationId": "Inspections_Put",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "inspectionUpdateRequest",
            "in": "body",
            "description": "InspectionResult",
            "required": true,
            "schema": {
              "$ref": "#/definitions/InspectionUpdateRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "d74b89a3-6e14-4723-9492-a4ab0ba05b9a"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Inspections"
        ],
        "summary": "Create an inspection",
        "description": "Create a new inspection with the given details.\r\n<br /><br />\r\nScope required: inspections\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/inspections",
        "operationId": "Inspections_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "inspectionCreateRequest",
            "in": "body",
            "description": "",
            "required": true,
            "schema": {
              "$ref": "#/definitions/InspectionCreateRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "00407dd4-28db-4455-abec-5ce831239911"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/OAuthInspectionCreateResult"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      }
    },
    "/api/insurance-policies": {
      "get": {
        "tags": [
          "InsurancePolicies"
        ],
        "summary": "Retrieve a list of insurance policies",
        "description": "Retrieves a page of active insurance policies the authorised user can access, in a stable order for paging.\r\nStatus matches the insurance hub. The API returns the certificates received; it does not check them against\r\nany cover the lease requires.\r\n<br /><br />\r\nWhen the page is full, MetaData.NextPageUrl holds the url of the next page, with the same filters; it is null on the last page.\r\n<br /><br />\r\nScope required: insurance\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/insurance-policies",
        "operationId": "InsurancePolicies_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "description": "Gets policies of the specified type: Tenant, Supplier or Property. If omitted, all types are returned.",
            "required": false,
            "type": "string"
          },
          {
            "name": "tenancyId",
            "in": "query",
            "description": "Gets tenant policies linked to the specified tenancy id (Guid)",
            "required": false,
            "type": "string"
          },
          {
            "name": "contactId",
            "in": "query",
            "description": "Gets supplier policies of the specified supplier contact id (Guid). Tenant policies have no contact; filter them by tenancyId instead.",
            "required": false,
            "type": "string"
          },
          {
            "name": "propertyId",
            "in": "query",
            "description": "Gets policies linked to the specified property id (Guid)",
            "required": false,
            "type": "string"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Gets policies with the specified status: Current, ExpiringSoon (expires within 30 days) or Expired",
            "required": false,
            "type": "string"
          },
          {
            "name": "expiryFrom",
            "in": "query",
            "description": "Gets policies expiring on or after the specified date. E.g. 2026-01-01",
            "required": false,
            "type": "string"
          },
          {
            "name": "expiryTo",
            "in": "query",
            "description": "Gets policies expiring on or before the specified date. E.g. 2026-12-31",
            "required": false,
            "type": "string"
          },
          {
            "name": "updatedAfterDate",
            "in": "query",
            "description": "Gets policies updated after the specified date (UTC). E.g. 2024-02-07T20:40:38",
            "required": false,
            "type": "string"
          },
          {
            "name": "fromId",
            "in": "query",
            "description": "Gets policies after the specified policy id. Use MetaData.NextPageUrl rather than setting this yourself.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of policies per page, from 1 to 100. Defaults to 100.",
            "required": false,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/InsurancePolicyDataModel"
            },
            "examples": {
              "application/json": {
                "InsurancePolicies": [
                  {
                    "Id": "5d2f8c3a-7b1e-4e6a-9f40-1c8b2d7e3a95",
                    "Type": "Tenant",
                    "PolicyNumber": "PL-20481937",
                    "InsurerName": "Harbour Mutual Insurance",
                    "InsuranceType": {
                      "Id": 2,
                      "Name": "Public Liability"
                    },
                    "CoverAmountType": "SpecifiedAmount",
                    "CoverAmount": 20000000.0,
                    "CapAmount": null,
                    "StartDate": "2025-12-10T00:00:00Z",
                    "ExpiryDate": "2026-12-10T00:00:00Z",
                    "Status": "ExpiringSoon",
                    "Broker": {
                      "Id": "a3c9e1f7-4d28-4b5e-8a61-0f7d3b9c2e48",
                      "Name": "Coastal Brokers Ltd"
                    },
                    "TenancyIds": [
                      "0b7d9a52-3e61-4c2f-a8d4-7e5f1c9b2a63"
                    ],
                    "ContactId": null,
                    "PropertyId": null,
                    "Title": null,
                    "Premium": null,
                    "Excess": null,
                    "Amounts": [
                      {
                        "Label": "Public liability",
                        "Amount": 20000000.0,
                        "Type": "Cover",
                        "CoverAmountType": "SpecifiedAmount",
                        "CapAmount": null
                      },
                      {
                        "Label": "Standard excess",
                        "Amount": 1000.0,
                        "Type": "Excess",
                        "CoverAmountType": "SpecifiedAmount",
                        "CapAmount": null
                      }
                    ],
                    "Attachments": [
                      {
                        "Id": "c47a2e91-5b3f-4d8c-a6e0-9f1b7d4c2a38",
                        "FileName": "Certificate of Currency 2026.pdf",
                        "UploadedDateUtc": "2025-12-12T11:56:47.2263538Z"
                      }
                    ],
                    "UpdatedDateUtc": "2025-12-12T11:56:47.2263538Z"
                  },
                  {
                    "Id": "2b8e5f71-c3a4-4d96-8e1b-6f0a9c3d7e52",
                    "Type": "Supplier",
                    "PolicyNumber": "CW-5531008",
                    "InsurerName": "Northern Indemnity",
                    "InsuranceType": {
                      "Id": 4,
                      "Name": "Contract Works"
                    },
                    "CoverAmountType": "ReplacementValue",
                    "CoverAmount": null,
                    "CapAmount": 2500000.0,
                    "StartDate": "2025-11-25T00:00:00Z",
                    "ExpiryDate": "2026-11-25T00:00:00Z",
                    "Status": "ExpiringSoon",
                    "Broker": null,
                    "TenancyIds": [],
                    "ContactId": "e8f14b26-9c3d-4a7e-b5d0-6a2c8f1e4b79",
                    "PropertyId": null,
                    "Title": null,
                    "Premium": null,
                    "Excess": null,
                    "Amounts": [
                      {
                        "Label": "Contract works",
                        "Amount": null,
                        "Type": "Cover",
                        "CoverAmountType": "ReplacementValue",
                        "CapAmount": 2500000.0
                      }
                    ],
                    "Attachments": [],
                    "UpdatedDateUtc": "2026-10-06T11:56:47.2263538Z"
                  },
                  {
                    "Id": "9e6b3d14-2a7c-4f58-b1e9-7c4a0d8f5b26",
                    "Type": "Property",
                    "PolicyNumber": null,
                    "InsurerName": "Harbour Mutual Insurance",
                    "InsuranceType": {
                      "Id": 5,
                      "Name": "Material Damage"
                    },
                    "CoverAmountType": "ReplacementValue",
                    "CoverAmount": null,
                    "CapAmount": 15000000.0,
                    "StartDate": "2025-11-30T00:00:00Z",
                    "ExpiryDate": "2026-11-30T00:00:00Z",
                    "Status": "ExpiringSoon",
                    "Broker": null,
                    "TenancyIds": [],
                    "ContactId": null,
                    "PropertyId": "6f1c2e4a-8b3d-4a8e-9c71-2d5b0f9e3a10",
                    "Title": "Building insurance 2026",
                    "Premium": 48250.0,
                    "Excess": 2500.0,
                    "Amounts": [],
                    "Attachments": [],
                    "UpdatedDateUtc": "2026-10-26T11:56:47.2263538Z"
                  }
                ],
                "MetaData": {
                  "NextPageUrl": "/api/insurance-policies?status=ExpiringSoon&limit=3&fromId=9e6b3d14-2a7c-4f58-b1e9-7c4a0d8f5b26"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/insurance-policies/{id}": {
      "get": {
        "tags": [
          "InsurancePolicies"
        ],
        "summary": "Retrieve a single insurance policy",
        "description": "Retrieves a single insurance policy with its certificates.\r\n<br /><br />\r\nScope required: insurance\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/insurance-policies/{id}",
        "operationId": "InsurancePolicies_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the insurance policy",
            "required": true,
            "type": "string",
            "default": "7250fc7a-8387-404b-a346-aeb85a9ac4ba"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/InsurancePolicyData"
            },
            "examples": {
              "application/json": {
                "Id": "5d2f8c3a-7b1e-4e6a-9f40-1c8b2d7e3a95",
                "Type": "Tenant",
                "PolicyNumber": "PL-20481937",
                "InsurerName": "Harbour Mutual Insurance",
                "InsuranceType": {
                  "Id": 2,
                  "Name": "Public Liability"
                },
                "CoverAmountType": "SpecifiedAmount",
                "CoverAmount": 20000000.0,
                "CapAmount": null,
                "StartDate": "2025-12-10T00:00:00Z",
                "ExpiryDate": "2026-12-10T00:00:00Z",
                "Status": "ExpiringSoon",
                "Broker": {
                  "Id": "a3c9e1f7-4d28-4b5e-8a61-0f7d3b9c2e48",
                  "Name": "Coastal Brokers Ltd"
                },
                "TenancyIds": [
                  "0b7d9a52-3e61-4c2f-a8d4-7e5f1c9b2a63"
                ],
                "ContactId": null,
                "PropertyId": null,
                "Title": null,
                "Premium": null,
                "Excess": null,
                "Amounts": [
                  {
                    "Label": "Public liability",
                    "Amount": 20000000.0,
                    "Type": "Cover",
                    "CoverAmountType": "SpecifiedAmount",
                    "CapAmount": null
                  },
                  {
                    "Label": "Standard excess",
                    "Amount": 1000.0,
                    "Type": "Excess",
                    "CoverAmountType": "SpecifiedAmount",
                    "CapAmount": null
                  }
                ],
                "Attachments": [
                  {
                    "Id": "c47a2e91-5b3f-4d8c-a6e0-9f1b7d4c2a38",
                    "FileName": "Certificate of Currency 2026.pdf",
                    "UploadedDateUtc": "2025-12-12T11:56:47.2263538Z"
                  }
                ],
                "UpdatedDateUtc": "2025-12-12T11:56:47.2263538Z"
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/insurance-policies/{id}/attachments/{attachmentId}/download": {
      "get": {
        "tags": [
          "InsurancePolicies"
        ],
        "summary": "Download an insurance policy certificate",
        "description": "Downloads a certificate attached to an insurance policy, with its original file name.\r\n<br /><br />\r\nScope required: insurance\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/insurance-policies/{id}/attachments/{attachmentId}/download",
        "operationId": "InsurancePolicies_GetAttachment",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the insurance policy",
            "required": true,
            "type": "string",
            "default": "4a154beb-9f3a-40fa-9f32-f306ec04a198"
          },
          {
            "name": "attachmentId",
            "in": "path",
            "description": "The unique identifier (Guid) of the attachment, from the policy's Attachments",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment returned for download",
            "schema": {
              "type": "object"
            },
            "examples": {
              "application/json": [
                "<octet-stream>"
              ]
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "Insurance policy or attachment not found, or not accessible to the authorised user"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/invoices": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Retrieve a list of invoices",
        "description": "Retrieves a list of invoices\r\n<br /><br />\r\nFilters combine, so <i>tenancyId</i> or <i>propertyId</i> can be used with <i>status</i>, <i>updatedAfterDate</i> and <i>fromId</i>.\r\n<i>MetaData.NextPageUrl</i> keeps the filters, so follow it to fetch the next page.\r\n<br /><br />\r\nScope required: invoices\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/invoices",
        "operationId": "Invoices_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "fromId",
            "in": "query",
            "description": "Gets invoices from specified id",
            "required": false,
            "type": "string"
          },
          {
            "name": "updatedAfterDate",
            "in": "query",
            "description": "Gets invoices updated after the specified date (UTC). E.g. 2024-02-07T20:40:38",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Gets invoices with a specific status",
            "required": false,
            "type": "string",
            "enum": [
              "None",
              "DRAFT",
              "AUTHORISED",
              "VOIDED",
              "SUBMITTED",
              "DELETED",
              "PAID"
            ]
          },
          {
            "name": "tenancyId",
            "in": "query",
            "description": "Gets invoices linked to the specified tenancy. An unknown tenancy returns an empty list",
            "required": false,
            "type": "string"
          },
          {
            "name": "propertyId",
            "in": "query",
            "description": "Gets invoices linked to the specified property, with or without a tenancy. An unknown property returns an empty list",
            "required": false,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/InvoiceResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": [
                  {
                    "Id": "83681b26-24a6-49c6-83a8-62e50e523a52",
                    "DisplayId": "INV-0001",
                    "Reference": "123ABC",
                    "Contact": {
                      "Id": "5fccdf74-8a6e-41ca-9422-56a6ee312a2e",
                      "Name": "Name",
                      "FirstName": "First Name",
                      "LastName": "Last Name",
                      "Email": "mail@sample.com"
                    },
                    "Company": {
                      "Id": "42479c8f-a3cc-48b5-97c1-70889de96f0c",
                      "Name": "My Company"
                    },
                    "Property": {
                      "Id": "dd176e91-5685-4e79-b563-6c3cc2115bc3",
                      "Name": "My Property",
                      "Type": "Commercial",
                      "Address": "1 / 500 High Street, Ahuriri, Napier Hawkes Bay 4000, New Zealand",
                      "Tenancy": {
                        "Id": "d8bef848-b54d-4f25-b808-1641544cd960",
                        "Title": "My tenancy",
                        "PropertyId": "ac5b8879-7545-4b85-9154-02a6928bba0d",
                        "DatePaidTo": "2026-11-15T11:56:47.2419818Z"
                      },
                      "PropertyManager": {
                        "Id": "a02704bc-1f3e-4f46-a5f6-3c4a09955c4b",
                        "Name": "Full Name",
                        "FirstName": "First Name",
                        "LastName": "Last Name",
                        "EmailAddress": "mail@sample.com"
                      },
                      "PropertyOwner": {
                        "Id": "28c9b32a-6e43-4820-b51a-d0d49a4f83df",
                        "Name": "Full Name",
                        "FirstName": "First Name",
                        "LastName": "Last Name",
                        "EmailAddress": "mail@sample.com"
                      }
                    },
                    "Type": "ACCREC",
                    "IssueDate": "2026-11-15T11:56:47.2419818Z",
                    "DueDate": "2026-11-15T11:56:47.2419818Z",
                    "ServiceDate": "2026-11-15T11:56:47.2419818Z",
                    "RentPeriodFromDate": "2026-11-15T11:56:47.2419818Z",
                    "RentPeriodToDate": "2026-11-15T11:56:47.2419818Z",
                    "OutgoingsPeriodFromDate": "2026-11-15T11:56:47.2419818Z",
                    "OutgoingsPeriodToDate": "2026-11-15T11:56:47.2419818Z",
                    "LineAmountTypes": "Exclusive",
                    "Status": "AUTHORISED",
                    "CreatedDate": "2026-11-15T11:56:47.2419818Z",
                    "AmountDue": 900.0,
                    "AmountPaid": 0.0,
                    "SubTotal": 1000.0,
                    "TotalTax": 0.0,
                    "Total": 1000.0,
                    "LineItems": [
                      {
                        "Id": "358c60fb-ac49-4e18-a6f3-274715a3bd0f",
                        "Description": "Rent",
                        "Quantity": 1.0,
                        "UnitAmount": 1000.0,
                        "TaxAmount": 150.0,
                        "TaxType": "101",
                        "AccountCode": "1000",
                        "Tracking": [
                          {
                            "Category": "Tracking Category",
                            "Option": "Tracking Category 1"
                          }
                        ]
                      }
                    ],
                    "Payments": [
                      {
                        "Id": "528db951-86e3-4c82-952a-c6abf15f8da6",
                        "PaymentDate": "2026-11-15T11:56:47.2419818Z",
                        "Amount": 100.0
                      }
                    ],
                    "Attachments": [],
                    "UpdatedDate": "2026-11-15T11:56:47.2419818Z"
                  }
                ],
                "MetaData": {
                  "NextPageUrl": "/api/invoices?fromId=b079b991-bac1-4101-8466-b1dd2ba75af2"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Invoices"
        ],
        "summary": "Update an invoice",
        "description": "Update an invoice with the given details.\r\n<br /><br />\r\nScope required: invoices\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/invoices",
        "operationId": "Invoices_Put",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "updateInvoiceRequest",
            "in": "body",
            "description": "InvoiceResult",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateInvoiceRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "d62aa632-fe3d-4d4b-936b-15f6742714cd"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/InvoiceModel"
            },
            "examples": {
              "application/json": {
                "Id": "999a1fcf-601b-49ec-8df4-a11675dfa241",
                "Reference": "May the force be with you",
                "ContactId": "d216c0f7-09ae-45fa-b619-7d5682db33ee",
                "CustomerId": "0a14d01c-0347-4a3c-a952-8374ac109245",
                "Type": 1,
                "IssueDate": "2026-11-15T11:56:47.2419818Z",
                "DueDate": "2026-11-15T11:56:47.2419818Z",
                "ServiceDate": "2026-11-15T11:56:47.2419818Z",
                "Status": 2,
                "LineAmountTypes": 2,
                "AmountDue": 1000,
                "AmountPaid": 0,
                "SubTotal": 1000,
                "Total": 1000,
                "LineItems": [
                  {
                    "Id": "7db4496d-af42-45cd-8e89-73111370c176",
                    "Description": "Water",
                    "Quantity": 1.0,
                    "UnitAmount": 1000.0,
                    "TaxType": "NONE",
                    "AccountCode": "0001"
                  }
                ],
                "PropertyId": "5f891620-8db6-47c3-b474-fd76d151299e",
                "TenancyId": "6175b88d-9990-4660-8768-0937f4b43e26"
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Create an invoice",
        "description": "Create an new invoice with the given details\r\n<br /><br />\r\nScope required: invoices\r\n<br /><br /><b>Request header</b>: A new <i>Idempotency-key</i> should be supplied with every POST request irrespective of the response type of the submitted invoice.<br />\r\nIf the invoice is successfully created and the same <i>Idempotency-key</i> is used in subsequent requests, the response returned will be the same invoice created the first time.\r\n<i>Idempotency-key</i> can be a string or Guid.\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/invoices",
        "operationId": "Invoices_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "createInvoiceRequest",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateInvoiceRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "536de469-1fe3-428f-92f5-bdd5429abf2c"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/InvoiceModel"
            },
            "examples": {
              "application/json": {
                "Data": {
                  "Id": "0b68899a-5819-4164-a166-486f71eec0ab",
                  "DisplayId": "INV-0001",
                  "Reference": "My Invoice",
                  "Contact": {
                    "Id": "dc257a25-da89-4352-8887-15b5026b1ac9",
                    "Name": "Name",
                    "FirstName": "First Name",
                    "LastName": "Last Name",
                    "Email": "mail@sample.com"
                  },
                  "Company": {
                    "Id": "ab55fc1b-8783-42ab-a865-deb2817c17ab",
                    "Name": "My Company"
                  },
                  "Property": {
                    "Id": "1115099b-8b36-4057-8469-fe9b288ab0e4",
                    "Name": "My Property",
                    "Type": "Commercial",
                    "Address": "1 / 500 High Street, Ahuriri, Napier Hawkes Bay 4000, New Zealand",
                    "Tenancy": {
                      "Id": "dc076ef0-66f8-41c3-8d9a-6e80f47ae99e",
                      "Title": "My tenancy",
                      "PropertyId": "ce649500-600b-43f2-ba41-d2c72895015e",
                      "DatePaidTo": "2026-11-15T11:56:47.2419818Z"
                    },
                    "PropertyManager": null,
                    "PropertyOwner": null
                  },
                  "Type": "ACCREC",
                  "IssueDate": "2026-11-15T11:56:47.2419818Z",
                  "DueDate": "2026-11-15T11:56:47.2419818Z",
                  "ServiceDate": "2026-11-15T11:56:47.2419818Z",
                  "RentPeriodFromDate": null,
                  "RentPeriodToDate": null,
                  "OutgoingsPeriodFromDate": null,
                  "OutgoingsPeriodToDate": null,
                  "LineAmountTypes": "Exclusive",
                  "Status": "AUTHORISED",
                  "CreatedDate": "2026-11-15T11:56:47.2419818Z",
                  "AmountDue": 1000.0,
                  "AmountPaid": 0.0,
                  "SubTotal": 1000.0,
                  "TotalTax": 0.0,
                  "Total": 1000.0,
                  "LineItems": [
                    {
                      "Id": "9c0de4f7-54af-4e36-9f20-9f318cdee8ca",
                      "Description": "Inspection cost",
                      "Quantity": 1.0,
                      "UnitAmount": 1000.0,
                      "TaxAmount": 0.0,
                      "TaxType": "NONE",
                      "AccountCode": "0001",
                      "Tracking": [
                        {
                          "Category": "Tracking Category",
                          "Option": "Tracking Category 1"
                        }
                      ]
                    }
                  ],
                  "Payments": [],
                  "Attachments": [],
                  "UpdatedDate": "2026-11-15T11:56:47.2419818Z"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/invoices/{id}": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Retrieve a single invoice",
        "description": "Retrieve a single invoice\r\n<br /><br />\r\nScope required: invoices\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/invoices/{id}",
        "operationId": "Invoices_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Invoice id",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "62291a55-680f-4183-8e7c-def1722fd4c4"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/InvoiceResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": {
                  "Id": "a8e440ae-9b41-4ad6-8952-6d062271c946",
                  "DisplayId": "INV-0001",
                  "Reference": "123ABC",
                  "Contact": {
                    "Id": "595d1dd4-36d7-4ef4-abfd-090f5f99dca1",
                    "Name": "Name",
                    "FirstName": "First Name",
                    "LastName": "Last Name",
                    "Email": "mail@sample.com"
                  },
                  "Company": {
                    "Id": "20b193d9-2c54-4bee-9230-b724a2d14aaa",
                    "Name": "My Company"
                  },
                  "Property": {
                    "Id": "635a5081-e909-4eac-af55-eedc1b3188fc",
                    "Name": "My Property",
                    "Type": "Commercial",
                    "Address": "1 / 500 High Street, Ahuriri, Napier Hawkes Bay 4000, New Zealand",
                    "Tenancy": {
                      "Id": "e31aa2ec-cdac-4e93-9e0a-47c8591949a6",
                      "Title": "My tenancy",
                      "PropertyId": "8adf78b3-277b-4757-b6af-938198bcf74b",
                      "DatePaidTo": "2026-11-15T11:56:47.2419818Z"
                    },
                    "PropertyManager": null,
                    "PropertyOwner": null
                  },
                  "Type": "ACCREC",
                  "IssueDate": "2026-11-15T11:56:47.2419818Z",
                  "DueDate": "2026-11-15T11:56:47.2419818Z",
                  "ServiceDate": "2026-11-15T11:56:47.2419818Z",
                  "RentPeriodFromDate": "2026-11-15T11:56:47.2419818Z",
                  "RentPeriodToDate": "2026-11-15T11:56:47.2419818Z",
                  "OutgoingsPeriodFromDate": "2026-11-15T11:56:47.2419818Z",
                  "OutgoingsPeriodToDate": "2026-11-15T11:56:47.2419818Z",
                  "LineAmountTypes": "Exclusive",
                  "Status": "AUTHORISED",
                  "CreatedDate": "2026-11-15T11:56:47.2419818Z",
                  "AmountDue": 1000.0,
                  "AmountPaid": 0.0,
                  "SubTotal": 1000.0,
                  "TotalTax": 0.0,
                  "Total": 1000.0,
                  "LineItems": [
                    {
                      "Id": "113aa280-f200-4156-b74a-c9c2b2b3709c",
                      "Description": "Rent",
                      "Quantity": 1.0,
                      "UnitAmount": 1000.0,
                      "TaxAmount": 150.0,
                      "TaxType": "101",
                      "AccountCode": "1000",
                      "Tracking": [
                        {
                          "Category": "Tracking Category",
                          "Option": "Tracking Category 1"
                        }
                      ]
                    }
                  ],
                  "Payments": [],
                  "Attachments": [
                    {
                      "Id": "976ba3b9-607a-41d7-85fe-4482a6ac626b",
                      "Name": "Filename.pdf",
                      "FileSize": 123,
                      "DownloadLink": "https://api.re-leased.com/api/invoices/{{invoiceId}}/attachments/{{attachmentId}}/download",
                      "MimeType": "application/pdf"
                    }
                  ],
                  "UpdatedDate": "2026-11-15T11:56:47.2419818Z"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/invoices/{invoiceId}/attachments/{attachmentId}/download": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Download a single invoice attachment",
        "description": "Download a single invoice attachment\r\n<br /><br />\r\nScope required: invoices\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/invoices/{invoiceId}/attachments/{attachmentId}/download",
        "operationId": "Invoices_GetAttachment",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "description": "Invoice id",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "attachmentId",
            "in": "path",
            "description": "Attachment id",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment returned for download",
            "schema": {
              "type": "object"
            },
            "examples": {
              "application/json": [
                "<octet-stream>"
              ]
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Authorization denied"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/maintenance": {
      "get": {
        "tags": [
          "Maintenance"
        ],
        "summary": "Retrieve a list of maintenance",
        "description": "Retrieves a list of recent and upcoming maintenance for the authorised user. Filtered automatically to include only maintenance which occur in the past and next 15 days.\r\nUse GET /api/maintenance/{id} to retrieve a task outside that window.\r\n<br /><br />\r\nScope required: maintenance\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/maintenance",
        "operationId": "Maintenance_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "includeTags",
            "in": "query",
            "description": "Includes the names of the active tags assigned to each maintenance task, and to the property and tenancy attached to it, in the response. Tags are shared across the company's billing group, so a tag assigned by a sibling company is included.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/MaintenanceDataModel"
            },
            "examples": {
              "application/json": {
                "Maintenance": [
                  {
                    "GlobalIdentifier": "c3d67415-6d2a-4f73-a2ce-8766fe7a86e4",
                    "UserTimeZone": "New Zealand Standard Time",
                    "FromDateUtc": "2026-11-15T11:56:47.2576053Z",
                    "FromDateLocal": "2026-11-15T11:56:47.2576053Z",
                    "ToDateUtc": "2026-11-15T13:56:47.2576053Z",
                    "ToDateLocal": "2026-11-15T13:56:47.2576053Z",
                    "Type": "Start",
                    "Category": "Routine",
                    "IsComplete": true,
                    "Description": "Routine maintenance to be carried out.",
                    "Notes": "Check behind fridge",
                    "Property": {
                      "Company": {
                        "GlobalIdentifier": "445c26fd-5695-46cd-9b9d-ab926e7be8c1",
                        "Name": "Snow Industries",
                        "Address": "King Street, Albany Auckland 1000, New Zealand",
                        "Street": "King Street",
                        "TownCity": "Albany",
                        "StateRegion": "Auckland",
                        "PostZipCode": "1000",
                        "Country": "New Zealand",
                        "LogoUrl": "https://us1.re-leased.com/photostream/GetLogo?imageName=5000.png",
                        "CompanyId": 100
                      },
                      "PropertyKeys": [
                        {
                          "Reference": "Key 001",
                          "Description": "Key Rack 2"
                        }
                      ],
                      "Areas": [
                        {
                          "AreaId": 1,
                          "AreaTypeId": 1,
                          "AreaTypeName": "Office",
                          "AreaTitle": "Ground Floor Office",
                          "AreaEpcRating": "B",
                          "AreaSize": 150.5,
                          "TenancyId": 0,
                          "TenancyGlobalIdentifier": "73b77ec4-4a58-4780-95a6-ffdf69866c33"
                        }
                      ],
                      "RatingValuations": null,
                      "EpcRating": null,
                      "PropertyGroup": {
                        "Id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                        "Title": "Downtown Portfolio"
                      },
                      "IsCommonProperty": false,
                      "CustomFields": [
                        {
                          "FieldIdentifier": "insurance-provider",
                          "Label": "Insurance Provider",
                          "Type": "String",
                          "Value": "AIG"
                        },
                        {
                          "FieldIdentifier": "roof-area-m2",
                          "Label": "Roof Area m2",
                          "Type": "Decimal",
                          "Value": 1250.5
                        },
                        {
                          "FieldIdentifier": "has-sprinklers",
                          "Label": "Has Sprinklers",
                          "Type": "Boolean",
                          "Value": true
                        },
                        {
                          "FieldIdentifier": "last-fire-inspection",
                          "Label": "Last Fire Inspection",
                          "Type": "DateTime",
                          "Value": "2026-03-14T00:00:00Z"
                        },
                        {
                          "FieldIdentifier": "heating-type",
                          "Label": "Heating Type",
                          "Type": "Dropdown",
                          "Value": "Heat Pump"
                        },
                        {
                          "FieldIdentifier": "compliance-certificates",
                          "Label": "Compliance Certificates",
                          "Type": "MultiSelectDropdown",
                          "Value": [
                            "Asbestos",
                            "Electrical"
                          ]
                        }
                      ],
                      "Tags": [
                        "commercial",
                        "firesafety"
                      ],
                      "GlobalIdentifier": "429f2e32-c979-42cc-88d9-9aa6a10df415",
                      "UpdatedDate": "0001-01-01T00:00:00",
                      "IsArchived": false,
                      "Status": "Active",
                      "CountryIsoCode": "NZ",
                      "VatElectedType": null,
                      "VatEffectiveDate": null,
                      "Manager": null,
                      "UsageType": null,
                      "CustomReference": null,
                      "Name": "South Office",
                      "ManagerGlobalIdentifier": "264f6cb8-61c4-44a4-a3c4-a9469d66bfb1",
                      "ManagerFirstName": "John",
                      "ManagerLastName": "Snow",
                      "ManagerEmail": "JohnSnow@email.com",
                      "ManagerPhoneNumber": "09 9705526",
                      "ManagerMobilePhoneNumber": "027 22545502",
                      "Address": "1 / 500 High Street, Ahuriri, Napier Hawkes Bay 4000, New Zealand",
                      "Type": "Office",
                      "Longitude": "147.25382409999997",
                      "Latitude": "-42.79149899999999",
                      "ImageUrl": "https://us1.re-leased.com/photostream/Get?imageName=100.jpg&imageSize=full",
                      "OwnerGlobalIdentifier": "23821bd4-2bf9-47fe-9450-6a5a5cd4928a",
                      "OwnerName": "B Smith",
                      "OwnerFirstName": "Bill",
                      "OwnerLastName": "Smith",
                      "OwnerEmail": "billsmith@email.com",
                      "OwnerPhoneNumber": "09 910545",
                      "OwnerMobilePhoneNumber": "027 45684651",
                      "PropertyId": 100,
                      "ManagerId": 200,
                      "OwnerId": 100,
                      "FlatNumber": "1",
                      "StreetNumber": "500",
                      "Street": "High Street",
                      "Suburb": "Ahuriri",
                      "TownCity": "Napier",
                      "StateRegion": "Hawkes Bay",
                      "PostZipCode": "4000",
                      "Country": "New Zealand",
                      "DateOfPurchase": null,
                      "PurchasePrice": null,
                      "LandArea": null,
                      "FloorArea": null,
                      "NumberOfBedrooms": 4,
                      "NumberOfBathrooms": 2.0,
                      "AllowsPets": false,
                      "AllowsSmoking": null,
                      "AllowsUnattendedInspections": null,
                      "IsFurnished": null
                    },
                    "Tenancy": {
                      "GlobalIdentifier": "ff7bb034-8460-473f-83f2-dd13e5f2cec7",
                      "PropertyGlobalIdentifier": "bce0920c-9a5a-4638-8191-e5fff48a2bef",
                      "Name": "Office",
                      "StartDateUtc": "2026-11-15T11:56:47.2576053Z",
                      "IsActive": true,
                      "Status": "Active",
                      "RentInclusive": false,
                      "LeaseType": {
                        "Id": 10,
                        "Name": "Commercial"
                      },
                      "IndustryType": {
                        "Id": 25,
                        "Name": "Retail"
                      },
                      "IsInsideTheLandlordAndTenantAct": true,
                      "EndDateUtc": "2027-11-15T11:56:47.2576053Z",
                      "RentFrequencyLength": 1,
                      "RentFrequencyUnit": "Weeks",
                      "RentFrequencyAmount": 630.0,
                      "RentFrequencyAmountExcludingOpex": 600.0,
                      "AnnualRentAmount": 32760.0,
                      "RentPaidToUtc": "2027-04-14T11:56:47.2576053Z",
                      "RentPartPayment": 0.0,
                      "Tenants": [
                        {
                          "GlobalIdentifier": "00000000-0000-0000-0000-000000000000",
                          "Name": "Smith Industries",
                          "FirstName": "Bob",
                          "LastName": "Smith",
                          "MobileNumber": "+64 27 5458842",
                          "PhoneNumber": "+64 9 8745412",
                          "Email": "BobSmith@email.com",
                          "TenantId": 0
                        }
                      ],
                      "Areas": [
                        {
                          "AreaId": 100,
                          "AreaTitle": "Office"
                        }
                      ],
                      "Terms": [],
                      "Breaks": [
                        {
                          "Id": 1,
                          "LeaseBreakTypeId": 4,
                          "Title": "Year-5 break",
                          "Description": "Tenant option to break at year 5",
                          "Notes": "Six months' written notice required",
                          "Occurrences": [
                            {
                              "Id": 1,
                              "BreakDateUtc": "2031-11-15T11:56:47.2576053Z",
                              "FinalNotificationDateUtc": "2031-05-15T11:56:47.2576053Z",
                              "NoticeServedDateUtc": null,
                              "CompletedDateUtc": null,
                              "IsRollingBreak": false,
                              "Status": "Active"
                            }
                          ]
                        }
                      ],
                      "CurrentReview": {
                        "Id": 1,
                        "ReviewDateUtc": "2027-11-15T11:56:47.2576053Z",
                        "IsComplete": false,
                        "ReviewType": {
                          "Id": 7,
                          "Name": "CPI"
                        }
                      },
                      "Clause": null,
                      "NoticeToVacate": null,
                      "UpdatedDate": "2026-11-15T11:56:47.2576053Z",
                      "TenancyId": 500,
                      "PropertyId": 100,
                      "CustomFields": [
                        {
                          "FieldIdentifier": "use-class",
                          "Label": "Use Class",
                          "Type": "Dropdown",
                          "Value": "E (Commercial / Business / Service)"
                        },
                        {
                          "FieldIdentifier": "inside-lt-act",
                          "Label": "Inside L&T Act",
                          "Type": "Boolean",
                          "Value": true
                        },
                        {
                          "FieldIdentifier": "lease-notes",
                          "Label": "Lease Notes",
                          "Type": "String",
                          "Value": "Renewed early at tenant request"
                        }
                      ],
                      "Tags": [
                        "arrears",
                        "renewal"
                      ],
                      "Notes": "Tenant has first right of refusal on the adjoining unit.",
                      "ArrearsStatus": {
                        "Id": 3,
                        "Name": "Payment Plan"
                      }
                    },
                    "MaintenanceId": 100,
                    "Title": "Routine Maintenance",
                    "AreaId": null,
                    "DelegatedUserId": null,
                    "DelegatedUserGlobalIdentifier": null,
                    "Url": "https://re-leased.com",
                    "Tags": [
                      "plumbing",
                      "urgent"
                    ],
                    "Status": "Complete",
                    "BudgetedCost": 450.0,
                    "CompletedCost": 420.0,
                    "CompletedDateUtc": "2026-11-15T13:56:47.2576053Z",
                    "WorkOrders": [
                      {
                        "GlobalIdentifier": "65d69d64-2624-40ca-9410-736b867919d1",
                        "WorkOrderNumber": "0001042",
                        "ExternalReference": "WO-7781",
                        "Status": "Complete",
                        "BudgetedCost": 450.0,
                        "DueDateUtc": "2026-11-15T11:56:47.2576053Z",
                        "SupplierGlobalIdentifier": "fa9312d2-06e2-40b1-bfbb-2f9a6d753fbf",
                        "SupplierName": "Acme Plumbing Ltd",
                        "Description": "Replace the leaking hot water cylinder valve.",
                        "NatureOfWork": "Plumbing",
                        "Priority": "High",
                        "SentDateUtc": "2026-11-12T11:56:47.2576053Z",
                        "CreatedDateUtc": "2026-11-11T11:56:47.2576053Z",
                        "UpdatedDateUtc": "2026-11-15T13:56:47.2576053Z",
                        "LinkedInvoices": [
                          {
                            "GlobalIdentifier": "f6962cd3-f9e5-40cc-814f-5e8c0bd4150c",
                            "Status": "AUTHORISED"
                          }
                        ]
                      }
                    ],
                    "LinkedInvoices": [
                      {
                        "GlobalIdentifier": "3aa83a24-6f47-4287-8a5d-eda3c5aef2b7",
                        "Status": "VOIDED"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Maintenance"
        ],
        "summary": "Update an maintenance",
        "description": "Update an maintenance with the given details.\r\n<br /><br />\r\nScope required: maintenance\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/maintenance",
        "operationId": "Maintenance_Put",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "maintenanceUpdateRequest",
            "in": "body",
            "description": "MaintenanceResult",
            "required": true,
            "schema": {
              "$ref": "#/definitions/MaintenanceUpdateRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "a2ed5cd5-740c-4b62-86ab-09cff06c25ab"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Result"
            },
            "examples": {
              "application/json": {
                "Success": true,
                "Message": null,
                "Messages": []
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Maintenance"
        ],
        "summary": "Create an maintenance",
        "description": "Create a new maintenance with the given details.\r\n<br /><br />\r\nScope required: maintenance\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/maintenance",
        "operationId": "Maintenance_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "maintenanceCreateRequest",
            "in": "body",
            "description": "",
            "required": true,
            "schema": {
              "$ref": "#/definitions/MaintenanceCreateRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "c81498ea-a087-4ace-9668-d233dd75a651"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/OAuthMaintenanceCreateResult"
            },
            "examples": {
              "application/json": {
                "Success": true,
                "Message": "",
                "GlobalIdentifier": "860f69ca-a178-4c21-95e7-ae3c62809334"
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/maintenance/{id}": {
      "get": {
        "tags": [
          "Maintenance"
        ],
        "summary": "Retrieve a single maintenance task by id",
        "description": "Retrieves a single maintenance task, with its work orders, for the authorised user. Unlike the list, it is not limited to tasks due in the past and next 15 days.\r\n<br /><br />\r\nScope required: maintenance\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/maintenance/{id}",
        "operationId": "Maintenance_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the maintenance task",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "7423420f-97ed-4d94-b824-5bd67736caf4"
          },
          {
            "name": "includeTags",
            "in": "query",
            "description": "Includes the names of the active tags assigned to the maintenance task, and to the property and tenancy attached to it, in the response.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/MaintenanceData"
            },
            "examples": {
              "application/json": {
                "GlobalIdentifier": "b339c9b1-3f46-40ff-b838-5c50f4a0d996",
                "UserTimeZone": "New Zealand Standard Time",
                "FromDateUtc": "2026-11-15T11:56:47.2576053Z",
                "FromDateLocal": "2026-11-15T11:56:47.2576053Z",
                "ToDateUtc": "2026-11-15T13:56:47.2576053Z",
                "ToDateLocal": "2026-11-15T13:56:47.2576053Z",
                "Type": "Start",
                "Category": "Routine",
                "IsComplete": true,
                "Description": "Routine maintenance to be carried out.",
                "Notes": "Check behind fridge",
                "Property": {
                  "Company": {
                    "GlobalIdentifier": "f7d8280d-6521-45e2-8dfc-90f8434c8c6a",
                    "Name": "Snow Industries",
                    "Address": "King Street, Albany Auckland 1000, New Zealand",
                    "Street": "King Street",
                    "TownCity": "Albany",
                    "StateRegion": "Auckland",
                    "PostZipCode": "1000",
                    "Country": "New Zealand",
                    "LogoUrl": "https://us1.re-leased.com/photostream/GetLogo?imageName=5000.png",
                    "CompanyId": 100
                  },
                  "PropertyKeys": [
                    {
                      "Reference": "Key 001",
                      "Description": "Key Rack 2"
                    }
                  ],
                  "Areas": [
                    {
                      "AreaId": 1,
                      "AreaTypeId": 1,
                      "AreaTypeName": "Office",
                      "AreaTitle": "Ground Floor Office",
                      "AreaEpcRating": "B",
                      "AreaSize": 150.5,
                      "TenancyId": 0,
                      "TenancyGlobalIdentifier": "002aebff-e7e8-40c9-9548-48514d75ca42"
                    }
                  ],
                  "RatingValuations": null,
                  "EpcRating": null,
                  "PropertyGroup": {
                    "Id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                    "Title": "Downtown Portfolio"
                  },
                  "IsCommonProperty": false,
                  "CustomFields": [
                    {
                      "FieldIdentifier": "insurance-provider",
                      "Label": "Insurance Provider",
                      "Type": "String",
                      "Value": "AIG"
                    },
                    {
                      "FieldIdentifier": "roof-area-m2",
                      "Label": "Roof Area m2",
                      "Type": "Decimal",
                      "Value": 1250.5
                    },
                    {
                      "FieldIdentifier": "has-sprinklers",
                      "Label": "Has Sprinklers",
                      "Type": "Boolean",
                      "Value": true
                    },
                    {
                      "FieldIdentifier": "last-fire-inspection",
                      "Label": "Last Fire Inspection",
                      "Type": "DateTime",
                      "Value": "2026-03-14T00:00:00Z"
                    },
                    {
                      "FieldIdentifier": "heating-type",
                      "Label": "Heating Type",
                      "Type": "Dropdown",
                      "Value": "Heat Pump"
                    },
                    {
                      "FieldIdentifier": "compliance-certificates",
                      "Label": "Compliance Certificates",
                      "Type": "MultiSelectDropdown",
                      "Value": [
                        "Asbestos",
                        "Electrical"
                      ]
                    }
                  ],
                  "Tags": [
                    "commercial",
                    "firesafety"
                  ],
                  "GlobalIdentifier": "f6571fca-f0c0-4f56-8411-3dec4591bf08",
                  "UpdatedDate": "0001-01-01T00:00:00",
                  "IsArchived": false,
                  "Status": "Active",
                  "CountryIsoCode": "NZ",
                  "VatElectedType": null,
                  "VatEffectiveDate": null,
                  "Manager": null,
                  "UsageType": null,
                  "CustomReference": null,
                  "Name": "South Office",
                  "ManagerGlobalIdentifier": "432a58fa-084c-4a86-98df-5184ac562185",
                  "ManagerFirstName": "John",
                  "ManagerLastName": "Snow",
                  "ManagerEmail": "JohnSnow@email.com",
                  "ManagerPhoneNumber": "09 9705526",
                  "ManagerMobilePhoneNumber": "027 22545502",
                  "Address": "1 / 500 High Street, Ahuriri, Napier Hawkes Bay 4000, New Zealand",
                  "Type": "Office",
                  "Longitude": "147.25382409999997",
                  "Latitude": "-42.79149899999999",
                  "ImageUrl": "https://us1.re-leased.com/photostream/Get?imageName=100.jpg&imageSize=full",
                  "OwnerGlobalIdentifier": "6fa0363f-51cf-4fef-a101-d61492319c89",
                  "OwnerName": "B Smith",
                  "OwnerFirstName": "Bill",
                  "OwnerLastName": "Smith",
                  "OwnerEmail": "billsmith@email.com",
                  "OwnerPhoneNumber": "09 910545",
                  "OwnerMobilePhoneNumber": "027 45684651",
                  "PropertyId": 100,
                  "ManagerId": 200,
                  "OwnerId": 100,
                  "FlatNumber": "1",
                  "StreetNumber": "500",
                  "Street": "High Street",
                  "Suburb": "Ahuriri",
                  "TownCity": "Napier",
                  "StateRegion": "Hawkes Bay",
                  "PostZipCode": "4000",
                  "Country": "New Zealand",
                  "DateOfPurchase": null,
                  "PurchasePrice": null,
                  "LandArea": null,
                  "FloorArea": null,
                  "NumberOfBedrooms": 4,
                  "NumberOfBathrooms": 2.0,
                  "AllowsPets": false,
                  "AllowsSmoking": null,
                  "AllowsUnattendedInspections": null,
                  "IsFurnished": null
                },
                "Tenancy": {
                  "GlobalIdentifier": "68519636-604d-4b25-a63b-024c32e3e261",
                  "PropertyGlobalIdentifier": "af20a435-c8b1-43e9-b877-9bb834e8bf0f",
                  "Name": "Office",
                  "StartDateUtc": "2026-11-15T11:56:47.2576053Z",
                  "IsActive": true,
                  "Status": "Active",
                  "RentInclusive": false,
                  "LeaseType": {
                    "Id": 10,
                    "Name": "Commercial"
                  },
                  "IndustryType": {
                    "Id": 25,
                    "Name": "Retail"
                  },
                  "IsInsideTheLandlordAndTenantAct": true,
                  "EndDateUtc": "2027-11-15T11:56:47.2576053Z",
                  "RentFrequencyLength": 1,
                  "RentFrequencyUnit": "Weeks",
                  "RentFrequencyAmount": 630.0,
                  "RentFrequencyAmountExcludingOpex": 600.0,
                  "AnnualRentAmount": 32760.0,
                  "RentPaidToUtc": "2027-04-14T11:56:47.2576053Z",
                  "RentPartPayment": 0.0,
                  "Tenants": [
                    {
                      "GlobalIdentifier": "00000000-0000-0000-0000-000000000000",
                      "Name": "Smith Industries",
                      "FirstName": "Bob",
                      "LastName": "Smith",
                      "MobileNumber": "+64 27 5458842",
                      "PhoneNumber": "+64 9 8745412",
                      "Email": "BobSmith@email.com",
                      "TenantId": 0
                    }
                  ],
                  "Areas": [
                    {
                      "AreaId": 100,
                      "AreaTitle": "Office"
                    }
                  ],
                  "Terms": [],
                  "Breaks": [
                    {
                      "Id": 1,
                      "LeaseBreakTypeId": 4,
                      "Title": "Year-5 break",
                      "Description": "Tenant option to break at year 5",
                      "Notes": "Six months' written notice required",
                      "Occurrences": [
                        {
                          "Id": 1,
                          "BreakDateUtc": "2031-11-15T11:56:47.2576053Z",
                          "FinalNotificationDateUtc": "2031-05-15T11:56:47.2576053Z",
                          "NoticeServedDateUtc": null,
                          "CompletedDateUtc": null,
                          "IsRollingBreak": false,
                          "Status": "Active"
                        }
                      ]
                    }
                  ],
                  "CurrentReview": {
                    "Id": 1,
                    "ReviewDateUtc": "2027-11-15T11:56:47.2576053Z",
                    "IsComplete": false,
                    "ReviewType": {
                      "Id": 7,
                      "Name": "CPI"
                    }
                  },
                  "Clause": null,
                  "NoticeToVacate": null,
                  "UpdatedDate": "2026-11-15T11:56:47.2576053Z",
                  "TenancyId": 500,
                  "PropertyId": 100,
                  "CustomFields": [
                    {
                      "FieldIdentifier": "use-class",
                      "Label": "Use Class",
                      "Type": "Dropdown",
                      "Value": "E (Commercial / Business / Service)"
                    },
                    {
                      "FieldIdentifier": "inside-lt-act",
                      "Label": "Inside L&T Act",
                      "Type": "Boolean",
                      "Value": true
                    },
                    {
                      "FieldIdentifier": "lease-notes",
                      "Label": "Lease Notes",
                      "Type": "String",
                      "Value": "Renewed early at tenant request"
                    }
                  ],
                  "Tags": [
                    "arrears",
                    "renewal"
                  ],
                  "Notes": "Tenant has first right of refusal on the adjoining unit.",
                  "ArrearsStatus": {
                    "Id": 3,
                    "Name": "Payment Plan"
                  }
                },
                "MaintenanceId": 100,
                "Title": "Routine Maintenance",
                "AreaId": null,
                "DelegatedUserId": null,
                "DelegatedUserGlobalIdentifier": null,
                "Url": "https://re-leased.com",
                "Tags": [
                  "plumbing",
                  "urgent"
                ],
                "Status": "Complete",
                "BudgetedCost": 450.0,
                "CompletedCost": 420.0,
                "CompletedDateUtc": "2026-11-15T13:56:47.2576053Z",
                "WorkOrders": [
                  {
                    "GlobalIdentifier": "80be64ef-bc77-40c7-9160-d9f4a3020046",
                    "WorkOrderNumber": "0001042",
                    "ExternalReference": "WO-7781",
                    "Status": "Complete",
                    "BudgetedCost": 450.0,
                    "DueDateUtc": "2026-11-15T11:56:47.2576053Z",
                    "SupplierGlobalIdentifier": "29a2c306-6e9f-4b56-aa60-aede45675ceb",
                    "SupplierName": "Acme Plumbing Ltd",
                    "Description": "Replace the leaking hot water cylinder valve.",
                    "NatureOfWork": "Plumbing",
                    "Priority": "High",
                    "SentDateUtc": "2026-11-12T11:56:47.2576053Z",
                    "CreatedDateUtc": "2026-11-11T11:56:47.2576053Z",
                    "UpdatedDateUtc": "2026-11-15T13:56:47.2576053Z",
                    "LinkedInvoices": [
                      {
                        "GlobalIdentifier": "4a2427f9-ea70-44fa-9bb2-206bbc60f451",
                        "Status": "AUTHORISED"
                      }
                    ]
                  }
                ],
                "LinkedInvoices": [
                  {
                    "GlobalIdentifier": "8296c01d-06a1-4569-b9f3-12fa6e76d7ad",
                    "Status": "VOIDED"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/notes": {
      "get": {
        "tags": [
          "Notes"
        ],
        "summary": "Retrieve a list of notes",
        "description": "Retrieves a page of active notes for the records the authorised user can access, in a stable order for paging\r\n(not by date - sort by RecordedDate yourself, or use GET /api/tenancies/{id}/notes for one tenancy newest first).\r\nArchived notes are never returned. Invoice notes are only returned when invoice notes are enabled for the company.\r\n<br /><br />\r\nWhen the page is full, MetaData.NextPageUrl holds the url of the next page; it is null on the last page.\r\n<br /><br />\r\nScope required: notes\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/notes",
        "operationId": "Notes_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "tenancyId",
            "in": "query",
            "description": "Gets notes linked to the specified tenancy id (Guid)",
            "required": false,
            "type": "string"
          },
          {
            "name": "propertyId",
            "in": "query",
            "description": "Gets notes linked to the specified property id (Guid)",
            "required": false,
            "type": "string"
          },
          {
            "name": "contactId",
            "in": "query",
            "description": "Gets notes linked to the specified contact id (Guid)",
            "required": false,
            "type": "string"
          },
          {
            "name": "noteTypeId",
            "in": "query",
            "description": "Gets notes of the specified note type. See GET /api/note-types for the ids.",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "isArrearsNote",
            "in": "query",
            "description": "true returns only arrears notes (the notes shown in the arrears hub); false returns only non-arrears notes. If null, both are returned.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "updatedAfterDate",
            "in": "query",
            "description": "Gets notes updated after the specified date (UTC). E.g. 2024-02-07T20:40:38. If null, no date filter is applied.",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "fromId",
            "in": "query",
            "description": "Gets notes after the specified note id. Use MetaData.NextPageUrl rather than setting this yourself.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of notes per page. Defaults to 100; at most 500.",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/NoteDataModel"
            },
            "examples": {
              "application/json": {
                "Notes": [
                  {
                    "Id": "3c8f1a6d-2b4e-4d9a-8f7c-5e0b9d1a2c47",
                    "Title": "Payment plan agreed",
                    "Content": "Tenant agreed to clear the March arrears over three monthly instalments.",
                    "NoteType": {
                      "Id": 4,
                      "Name": "Arrears",
                      "IsArrearsNote": true,
                      "IsInvoiceNote": false
                    },
                    "RecordedDate": "2026-11-13T00:00:00Z",
                    "CreatedDateUtc": "2026-11-13T11:56:47.2576053Z",
                    "UpdatedDateUtc": "2026-11-14T11:56:47.2576053Z",
                    "Author": {
                      "Name": "Jane Doe",
                      "Email": "jane.doe@example.com"
                    },
                    "PropertyId": "6f1c2e4a-8b3d-4a8e-9c71-2d5b0f9e3a10",
                    "TenancyId": "0b7d9a52-3e61-4c2f-a8d4-7e5f1c9b2a63",
                    "ContactId": null,
                    "Tags": [
                      "paymentplan"
                    ]
                  },
                  {
                    "Id": "7e2b5d90-1f3a-4c6e-9b8d-0a4f2e6c1d35",
                    "Title": "Reminder call",
                    "Content": "Called the tenant about the overdue rent invoice. Left a voicemail.",
                    "NoteType": {
                      "Id": 4,
                      "Name": "Arrears",
                      "IsArrearsNote": true,
                      "IsInvoiceNote": false
                    },
                    "RecordedDate": "2026-11-01T00:00:00Z",
                    "CreatedDateUtc": "2026-11-01T11:56:47.2576053Z",
                    "UpdatedDateUtc": "2026-11-01T11:56:47.2576053Z",
                    "Author": {
                      "Name": "Jane Doe",
                      "Email": "jane.doe@example.com"
                    },
                    "PropertyId": "6f1c2e4a-8b3d-4a8e-9c71-2d5b0f9e3a10",
                    "TenancyId": "0b7d9a52-3e61-4c2f-a8d4-7e5f1c9b2a63",
                    "ContactId": null,
                    "Tags": []
                  }
                ],
                "MetaData": {
                  "NextPageUrl": "api/notes?tenancyId=0b7d9a52-3e61-4c2f-a8d4-7e5f1c9b2a63&isArrearsNote=true&fromId=9a4e3b21-5c7d-4f08-b6e2-1d8c0a7f5e94"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/tenancies/{id}/notes": {
      "get": {
        "tags": [
          "Notes"
        ],
        "summary": "Retrieve the notes for a tenancy",
        "description": "Retrieves every active note linked to the tenancy, newest first, including its arrears notes.\r\nArchived notes are never returned. The tenancy's own free-text notes are returned as Notes on GET /api/tenancies/{id}.\r\n<br /><br />\r\nScope required: notes\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/tenancies/{id}/notes",
        "operationId": "Notes_GetForTenancy",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the tenancy",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "13d32eac-ec0e-4984-bf6f-a09e3a8bb36c"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/NoteDataModel"
            },
            "examples": {
              "application/json": {
                "Notes": [
                  {
                    "Id": "3c8f1a6d-2b4e-4d9a-8f7c-5e0b9d1a2c47",
                    "Title": "Payment plan agreed",
                    "Content": "Tenant agreed to clear the March arrears over three monthly instalments.",
                    "NoteType": {
                      "Id": 4,
                      "Name": "Arrears",
                      "IsArrearsNote": true,
                      "IsInvoiceNote": false
                    },
                    "RecordedDate": "2026-11-13T00:00:00Z",
                    "CreatedDateUtc": "2026-11-13T11:56:47.2576053Z",
                    "UpdatedDateUtc": "2026-11-14T11:56:47.2576053Z",
                    "Author": {
                      "Name": "Jane Doe",
                      "Email": "jane.doe@example.com"
                    },
                    "PropertyId": "6f1c2e4a-8b3d-4a8e-9c71-2d5b0f9e3a10",
                    "TenancyId": "0b7d9a52-3e61-4c2f-a8d4-7e5f1c9b2a63",
                    "ContactId": null,
                    "Tags": [
                      "paymentplan"
                    ]
                  },
                  {
                    "Id": "7e2b5d90-1f3a-4c6e-9b8d-0a4f2e6c1d35",
                    "Title": "Reminder call",
                    "Content": "Called the tenant about the overdue rent invoice. Left a voicemail.",
                    "NoteType": {
                      "Id": 4,
                      "Name": "Arrears",
                      "IsArrearsNote": true,
                      "IsInvoiceNote": false
                    },
                    "RecordedDate": "2026-11-01T00:00:00Z",
                    "CreatedDateUtc": "2026-11-01T11:56:47.2576053Z",
                    "UpdatedDateUtc": "2026-11-01T11:56:47.2576053Z",
                    "Author": {
                      "Name": "Jane Doe",
                      "Email": "jane.doe@example.com"
                    },
                    "PropertyId": "6f1c2e4a-8b3d-4a8e-9c71-2d5b0f9e3a10",
                    "TenancyId": "0b7d9a52-3e61-4c2f-a8d4-7e5f1c9b2a63",
                    "ContactId": null,
                    "Tags": []
                  }
                ]
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/note-types": {
      "get": {
        "tags": [
          "Notes"
        ],
        "summary": "Retrieve the note types",
        "description": "Retrieves the company's active note types with their arrears and invoice flags.\r\nUse a type's Id as the noteTypeId filter on GET /api/notes.\r\n<br /><br />\r\nScope required: notes\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/note-types",
        "operationId": "Notes_GetNoteTypes",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/NoteTypeDataModel"
            },
            "examples": {
              "application/json": {
                "NoteTypes": [
                  {
                    "Id": 1,
                    "Name": "General",
                    "IsArrearsNote": false,
                    "IsInvoiceNote": false
                  },
                  {
                    "Id": 4,
                    "Name": "Arrears",
                    "IsArrearsNote": true,
                    "IsInvoiceNote": false
                  },
                  {
                    "Id": 7,
                    "Name": "Invoice",
                    "IsArrearsNote": false,
                    "IsInvoiceNote": true
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/payments": {
      "get": {
        "tags": [
          "Payments"
        ],
        "summary": "Retrieve a list of payments",
        "description": "Retrieves a list of payments for supplied company id\r\n<br /><br />\r\nScope required: payments\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/payments",
        "operationId": "Payments_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "description": "Company id of the contacts, please provide a guid for an example response",
            "required": true,
            "type": "string",
            "default": "0eb1ea6d-d93a-4cef-864a-1fdff3d0a915"
          },
          {
            "name": "fromId",
            "in": "query",
            "description": "Gets payments from specified id",
            "required": false,
            "type": "string"
          },
          {
            "name": "updatedAfterDate",
            "in": "query",
            "description": "Gets payments updated after the specified date (UTC). E.g. 2024-02-07T20:40:38",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PaymentsResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": [
                  {
                    "Id": "22081561-0cb7-4765-84d2-42bbcd46e666",
                    "PaymentDate": "2026-11-14T11:56:47.2576053Z",
                    "Amount": 100.0,
                    "Reference": "My payment",
                    "PaymentStatus": "Authorised",
                    "PaymentType": "General",
                    "CreatedDate": "2026-11-14T11:56:47.2576053Z",
                    "Invoice": {
                      "Id": "20f8bbf6-a0c1-4616-a1b3-983a0bafc764",
                      "DisplayId": "INV-0042",
                      "Status": "AUTHORISED",
                      "AmountDue": 900.0,
                      "Total": 1000.0
                    },
                    "Company": {
                      "Id": "1d5882e7-0130-43a8-ad12-992ba6c6652d",
                      "Name": "Snow Industries"
                    },
                    "UpdatedDate": "2026-11-15T11:56:47.2576053Z"
                  }
                ],
                "MetaData": {
                  "NextPageUrl": "/api/payments?companyId=1923248e-4605-4445-bcaa-0ee0fb3be215&fromId=af172ea1-b0e6-4093-9c85-b65856ceddbe"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Payments"
        ],
        "summary": "Reverse a single payment",
        "description": "Reverse a single payment with a provided id and reason for the reversal\r\n<br /><br />\r\nScope required: payments\r\n<br /><br /><br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/payments",
        "operationId": "Payments_Put",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PutPaymentRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "f11e16a0-ff13-44c5-9cb5-be50452bb12f"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Payment"
            },
            "examples": {
              "application/json": {
                "Id": "fa993944-0290-4128-8eb6-c291e669fcba",
                "PaymentDate": "2026-11-15T11:56:47.2732272Z",
                "Amount": 1000.0,
                "Reference": "Service",
                "PaymentStatus": "Authorised",
                "PaymentType": "General",
                "CreatedDate": "2026-11-15T11:56:47.2732272Z",
                "Invoice": {
                  "Id": "11245531-d18a-466a-b7bb-e84c371b4aa3",
                  "DisplayId": "INV-0042",
                  "Status": "AUTHORISED",
                  "AmountDue": 0.0,
                  "Total": 1000.0
                },
                "Company": {
                  "Id": "06711429-826d-4470-bf41-a21edce07a49",
                  "Name": "Snow company"
                },
                "UpdatedDate": "2026-11-15T11:56:47.2732272Z"
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Payments"
        ],
        "summary": "Make a single payment against an invoice",
        "description": "Create an payment with given details\r\n<br /><br />\r\nScope required: payments\r\n<br /><br /><b>Request header</b>: A new <i>Idempotency-key</i> should be supplied with every POST request irrespective of the response type of the submitted payment.<br />\r\nIf the payment is successfully created and the same <i>Idempotency-key</i> is used in subsequent requests, the response returned will be the same payment created the first time.\r\n<i>Idempotency-key</i> can be a string or Guid.\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/payments",
        "operationId": "Payments_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreatePaymentRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "60b73fd8-8a12-4baa-be4e-2ed9b35f5f8f"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Payment"
            },
            "examples": {
              "application/json": {
                "Id": "cad3701a-d0ae-4936-8856-6b8e7d020819",
                "PaymentDate": "2026-11-15T11:56:47.2732272Z",
                "Amount": 1000.0,
                "Reference": "Service",
                "PaymentStatus": "Authorised",
                "PaymentType": "General",
                "CreatedDate": "2026-11-15T11:56:47.2732272Z",
                "Invoice": {
                  "Id": "78e1773a-308b-4624-8bf1-cf006b904cec",
                  "DisplayId": "INV-0042",
                  "Status": "PAID",
                  "AmountDue": 0.0,
                  "Total": 1000.0
                },
                "Company": {
                  "Id": "1f11ab54-2902-4472-adc1-80662ce9e17b",
                  "Name": "Snow company"
                },
                "UpdatedDate": "2026-11-15T11:56:47.2732272Z"
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/payments/{id}": {
      "get": {
        "tags": [
          "Payments"
        ],
        "summary": "Retrieve a single payment",
        "description": "Retrieve a single payment\r\n<br /><br />\r\nScope required: payments\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/payments/{id}",
        "operationId": "Payments_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment id",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "ae824aa9-beb3-4d2e-bb26-3cbaea9369e0"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PaymentResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": {
                  "Id": "d0d1c0b5-e86a-49f0-8e15-943b9b56bbb6",
                  "PaymentDate": "2026-11-14T11:56:47.2732272Z",
                  "Amount": 100.0,
                  "Reference": "My payment",
                  "PaymentStatus": "Authorised",
                  "PaymentType": "General",
                  "CreatedDate": "2026-11-14T11:56:47.2732272Z",
                  "Invoice": {
                    "Id": "c8e60257-f3db-4867-8744-92beba7adab3",
                    "DisplayId": "INV-0042",
                    "Status": "AUTHORISED",
                    "AmountDue": 900.0,
                    "Total": 1000.0
                  },
                  "Company": {
                    "Id": "aae236e7-4697-4c51-b218-cc6768d58d82",
                    "Name": "Snow Industries"
                  },
                  "UpdatedDate": "2026-11-15T11:56:47.2732272Z"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/invoice/{id}/payments": {
      "get": {
        "tags": [
          "Payments"
        ],
        "summary": "Retrieve a list of payments of an invoice",
        "description": "Retrieves a list of payments for supplied invoice id\r\n<br /><br />\r\nScope required: payments\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/invoice/{id}/payments",
        "operationId": "Payments_GetInvoicePayments",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Invoice id for payments",
            "required": true,
            "type": "string",
            "default": "6da53e8c-ea33-4f08-9d01-a53fd00f9e47"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/InvoicePaymentsResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": [
                  {
                    "Id": "d5b955d1-294f-4f5b-9e2b-0053b76a2162",
                    "PaymentDate": "2026-11-14T11:56:47.2732272Z",
                    "Amount": 100.0,
                    "Reference": "My payment",
                    "PaymentStatus": "Authorised",
                    "PaymentType": "General",
                    "CreatedDate": "2026-11-14T11:56:47.2732272Z",
                    "Invoice": {
                      "Id": "7e434141-aa71-4eb5-ac74-6aeb0c5bdd0f",
                      "DisplayId": "INV-0042",
                      "Status": "AUTHORISED",
                      "AmountDue": 900.0,
                      "Total": 1000.0
                    },
                    "Company": {
                      "Id": "f357136e-3773-49f8-8803-88f754b0cb7c",
                      "Name": "Snow Industries"
                    },
                    "UpdatedDate": "2026-11-15T11:56:47.2732272Z"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/properties": {
      "get": {
        "tags": [
          "Properties"
        ],
        "summary": "Retrieve a list of properties",
        "description": "Retrieves a list of properties for the authorised user.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/properties",
        "operationId": "Properties_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "updatedAfterDate",
            "in": "query",
            "description": "Gets properties updated after the specified date (UTC). E.g. 2024-02-07T20:40:38",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "customReference",
            "in": "query",
            "description": "Gets properties with the specified custom reference",
            "required": false,
            "type": "string"
          },
          {
            "name": "fromId",
            "in": "query",
            "description": "Gets property from a specified id",
            "required": false,
            "type": "string"
          },
          {
            "name": "includeRatingValuations",
            "in": "query",
            "description": "Includes rating valuations for each property in the response",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "includeCustomFields",
            "in": "query",
            "description": "Includes custom field values for each property in the response. Only fields with a value are returned; empty when the company has no custom fields subscription.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "includeTags",
            "in": "query",
            "description": "Includes the names of the active tags assigned to each property in the response. Tags are shared across the company's billing group, so a tag assigned by a sibling company is included.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PropertyDataModel"
            },
            "examples": {
              "application/json": {
                "Properties": [
                  {
                    "Company": {
                      "GlobalIdentifier": "e345e038-baca-40b1-b59d-f30cc95a3ca1",
                      "Name": "Snow Industries",
                      "Address": "King Street, Albany Auckland 1000, New Zealand",
                      "Street": "King Street",
                      "TownCity": "Albany",
                      "StateRegion": "Auckland",
                      "PostZipCode": "1000",
                      "Country": "New Zealand",
                      "LogoUrl": "https://us1.re-leased.com/photostream/GetLogo?imageName=5000.png",
                      "CompanyId": 100
                    },
                    "PropertyKeys": [
                      {
                        "Reference": "Key 001",
                        "Description": "Key Rack 2"
                      }
                    ],
                    "Areas": [
                      {
                        "AreaId": 1,
                        "AreaTypeId": 1,
                        "AreaTypeName": "Office",
                        "AreaTitle": "Ground Floor Office",
                        "AreaEpcRating": "B",
                        "AreaSize": 150.5,
                        "TenancyId": 0,
                        "TenancyGlobalIdentifier": "0e64adb4-b316-4296-b7c0-a57bf3eb578c"
                      }
                    ],
                    "RatingValuations": null,
                    "EpcRating": null,
                    "PropertyGroup": {
                      "Id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "Title": "Downtown Portfolio"
                    },
                    "IsCommonProperty": false,
                    "CustomFields": [
                      {
                        "FieldIdentifier": "insurance-provider",
                        "Label": "Insurance Provider",
                        "Type": "String",
                        "Value": "AIG"
                      },
                      {
                        "FieldIdentifier": "roof-area-m2",
                        "Label": "Roof Area m2",
                        "Type": "Decimal",
                        "Value": 1250.5
                      },
                      {
                        "FieldIdentifier": "has-sprinklers",
                        "Label": "Has Sprinklers",
                        "Type": "Boolean",
                        "Value": true
                      },
                      {
                        "FieldIdentifier": "last-fire-inspection",
                        "Label": "Last Fire Inspection",
                        "Type": "DateTime",
                        "Value": "2026-03-14T00:00:00Z"
                      },
                      {
                        "FieldIdentifier": "heating-type",
                        "Label": "Heating Type",
                        "Type": "Dropdown",
                        "Value": "Heat Pump"
                      },
                      {
                        "FieldIdentifier": "compliance-certificates",
                        "Label": "Compliance Certificates",
                        "Type": "MultiSelectDropdown",
                        "Value": [
                          "Asbestos",
                          "Electrical"
                        ]
                      }
                    ],
                    "Tags": [
                      "commercial",
                      "firesafety"
                    ],
                    "GlobalIdentifier": "4a530bef-348b-4963-a03f-5e69cbd91cdd",
                    "UpdatedDate": "0001-01-01T00:00:00",
                    "IsArchived": false,
                    "Status": "Active",
                    "CountryIsoCode": "NZ",
                    "VatElectedType": null,
                    "VatEffectiveDate": null,
                    "Manager": null,
                    "UsageType": null,
                    "CustomReference": null,
                    "Name": "South Office",
                    "ManagerGlobalIdentifier": "0ecd9c4c-0cb2-4831-bddc-a7a9e2883bc6",
                    "ManagerFirstName": "John",
                    "ManagerLastName": "Snow",
                    "ManagerEmail": "JohnSnow@email.com",
                    "ManagerPhoneNumber": "09 9705526",
                    "ManagerMobilePhoneNumber": "027 22545502",
                    "Address": "1 / 500 High Street, Ahuriri, Napier Hawkes Bay 4000, New Zealand",
                    "Type": "Office",
                    "Longitude": "147.25382409999997",
                    "Latitude": "-42.79149899999999",
                    "ImageUrl": "https://us1.re-leased.com/photostream/Get?imageName=100.jpg&imageSize=full",
                    "OwnerGlobalIdentifier": "c211e74b-5332-4009-b630-fa8f575a29b8",
                    "OwnerName": "B Smith",
                    "OwnerFirstName": "Bill",
                    "OwnerLastName": "Smith",
                    "OwnerEmail": "billsmith@email.com",
                    "OwnerPhoneNumber": "09 910545",
                    "OwnerMobilePhoneNumber": "027 45684651",
                    "PropertyId": 100,
                    "ManagerId": 200,
                    "OwnerId": 100,
                    "FlatNumber": "1",
                    "StreetNumber": "500",
                    "Street": "High Street",
                    "Suburb": "Ahuriri",
                    "TownCity": "Napier",
                    "StateRegion": "Hawkes Bay",
                    "PostZipCode": "4000",
                    "Country": "New Zealand",
                    "DateOfPurchase": null,
                    "PurchasePrice": null,
                    "LandArea": null,
                    "FloorArea": null,
                    "NumberOfBedrooms": 4,
                    "NumberOfBathrooms": 2.0,
                    "AllowsPets": false,
                    "AllowsSmoking": null,
                    "AllowsUnattendedInspections": null,
                    "IsFurnished": null
                  }
                ]
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Properties"
        ],
        "summary": "Update a property's details",
        "description": "Updates specific fields of a property.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/properties",
        "operationId": "Properties_UpdateProperty",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "propertyUpdateRequest",
            "in": "body",
            "description": "PropertyResult",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PropertyUpdateRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "82b02af6-f82a-432f-a2bb-f4b5e96ed8c6"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Properties"
        ],
        "summary": "Create a new property",
        "description": "Creates a new property \"shell\" for the supplied company. Areas, leases and keys are added separately.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br /><b>Request header</b>: A new <i>Idempotency-Key</i> should be supplied with every POST request irrespective of the response type.<br />\r\nIf the property is successfully created and the same <i>Idempotency-Key</i> is used in subsequent requests, the response returned will be the same property created the first time.\r\n<i>Idempotency-Key</i> can be a string or Guid.\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/properties",
        "operationId": "Properties_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "createPropertyRequest",
            "in": "body",
            "description": "Property details for the new property",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreatePropertyRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "a1ae2761-2f47-43ee-83d1-33f881b94063"
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/PropertyData"
            },
            "examples": {
              "application/json": {
                "Company": {
                  "GlobalIdentifier": "8a963bdf-250e-4390-9a76-be28d00d9d25",
                  "Name": "Snow Industries",
                  "Address": "King Street, Albany Auckland 1000, New Zealand",
                  "Street": "King Street",
                  "TownCity": "Albany",
                  "StateRegion": "Auckland",
                  "PostZipCode": "1000",
                  "Country": "New Zealand",
                  "LogoUrl": "https://us1.re-leased.com/photostream/GetLogo?imageName=5000.png",
                  "CompanyId": 100
                },
                "PropertyKeys": [
                  {
                    "Reference": "Key 001",
                    "Description": "Key Rack 2"
                  }
                ],
                "Areas": [
                  {
                    "AreaId": 1,
                    "AreaTypeId": 1,
                    "AreaTypeName": "Office",
                    "AreaTitle": "Ground Floor Office",
                    "AreaEpcRating": "B",
                    "AreaSize": 150.5,
                    "TenancyId": 0,
                    "TenancyGlobalIdentifier": "40d9009f-d638-41f7-8777-955e9be87b9e"
                  }
                ],
                "RatingValuations": null,
                "EpcRating": null,
                "PropertyGroup": {
                  "Id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "Title": "Downtown Portfolio"
                },
                "IsCommonProperty": false,
                "CustomFields": [
                  {
                    "FieldIdentifier": "insurance-provider",
                    "Label": "Insurance Provider",
                    "Type": "String",
                    "Value": "AIG"
                  },
                  {
                    "FieldIdentifier": "roof-area-m2",
                    "Label": "Roof Area m2",
                    "Type": "Decimal",
                    "Value": 1250.5
                  },
                  {
                    "FieldIdentifier": "has-sprinklers",
                    "Label": "Has Sprinklers",
                    "Type": "Boolean",
                    "Value": true
                  },
                  {
                    "FieldIdentifier": "last-fire-inspection",
                    "Label": "Last Fire Inspection",
                    "Type": "DateTime",
                    "Value": "2026-03-14T00:00:00Z"
                  },
                  {
                    "FieldIdentifier": "heating-type",
                    "Label": "Heating Type",
                    "Type": "Dropdown",
                    "Value": "Heat Pump"
                  },
                  {
                    "FieldIdentifier": "compliance-certificates",
                    "Label": "Compliance Certificates",
                    "Type": "MultiSelectDropdown",
                    "Value": [
                      "Asbestos",
                      "Electrical"
                    ]
                  }
                ],
                "Tags": [
                  "commercial",
                  "firesafety"
                ],
                "GlobalIdentifier": "46d7cd0e-cb7b-4259-9710-1c88d81809d6",
                "UpdatedDate": "0001-01-01T00:00:00",
                "IsArchived": false,
                "Status": "Active",
                "CountryIsoCode": "NZ",
                "VatElectedType": null,
                "VatEffectiveDate": null,
                "Manager": null,
                "UsageType": null,
                "CustomReference": null,
                "Name": "South Office",
                "ManagerGlobalIdentifier": "2b24b716-ffe2-404a-8a54-89ad908bbaf1",
                "ManagerFirstName": "John",
                "ManagerLastName": "Snow",
                "ManagerEmail": "JohnSnow@email.com",
                "ManagerPhoneNumber": "09 9705526",
                "ManagerMobilePhoneNumber": "027 22545502",
                "Address": "1 / 500 High Street, Ahuriri, Napier Hawkes Bay 4000, New Zealand",
                "Type": "Office",
                "Longitude": "147.25382409999997",
                "Latitude": "-42.79149899999999",
                "ImageUrl": "https://us1.re-leased.com/photostream/Get?imageName=100.jpg&imageSize=full",
                "OwnerGlobalIdentifier": "c48abae1-e3f3-421f-af88-fb4d7ca0216c",
                "OwnerName": "B Smith",
                "OwnerFirstName": "Bill",
                "OwnerLastName": "Smith",
                "OwnerEmail": "billsmith@email.com",
                "OwnerPhoneNumber": "09 910545",
                "OwnerMobilePhoneNumber": "027 45684651",
                "PropertyId": 100,
                "ManagerId": 200,
                "OwnerId": 100,
                "FlatNumber": "1",
                "StreetNumber": "500",
                "Street": "High Street",
                "Suburb": "Ahuriri",
                "TownCity": "Napier",
                "StateRegion": "Hawkes Bay",
                "PostZipCode": "4000",
                "Country": "New Zealand",
                "DateOfPurchase": null,
                "PurchasePrice": null,
                "LandArea": null,
                "FloorArea": null,
                "NumberOfBedrooms": 4,
                "NumberOfBathrooms": 2.0,
                "AllowsPets": false,
                "AllowsSmoking": null,
                "AllowsUnattendedInspections": null,
                "IsFurnished": null
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/properties/{id}": {
      "get": {
        "tags": [
          "Properties"
        ],
        "summary": "Retrieve a single property by id",
        "description": "Retrieves a single property by id for the authorised user.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/properties/{id}",
        "operationId": "Properties_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the property",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "930384c4-c942-4f8e-a80b-1dc47da54fe0"
          },
          {
            "name": "includeCustomFields",
            "in": "query",
            "description": "Includes custom field values for the property in the response. Only fields with a value are returned; empty when the company has no custom fields subscription.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "includeTags",
            "in": "query",
            "description": "Includes the names of the active tags assigned to the property in the response. Tags are shared across the company's billing group, so a tag assigned by a sibling company is included.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PropertyData"
            },
            "examples": {
              "application/json": {
                "Company": {
                  "GlobalIdentifier": "5fb384af-45aa-4466-bf92-889b12e04ab6",
                  "Name": "Snow Industries",
                  "Address": "King Street, Albany Auckland 1000, New Zealand",
                  "Street": "King Street",
                  "TownCity": "Albany",
                  "StateRegion": "Auckland",
                  "PostZipCode": "1000",
                  "Country": "New Zealand",
                  "LogoUrl": "https://us1.re-leased.com/photostream/GetLogo?imageName=5000.png",
                  "CompanyId": 100
                },
                "PropertyKeys": [
                  {
                    "Reference": "Key 001",
                    "Description": "Key Rack 2"
                  }
                ],
                "Areas": [
                  {
                    "AreaId": 1,
                    "AreaTypeId": 1,
                    "AreaTypeName": "Office",
                    "AreaTitle": "Ground Floor Office",
                    "AreaEpcRating": "B",
                    "AreaSize": 150.5,
                    "TenancyId": 0,
                    "TenancyGlobalIdentifier": "564b2727-13e1-44f6-8e36-3ce0c6445370"
                  }
                ],
                "RatingValuations": null,
                "EpcRating": null,
                "PropertyGroup": {
                  "Id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "Title": "Downtown Portfolio"
                },
                "IsCommonProperty": false,
                "CustomFields": [
                  {
                    "FieldIdentifier": "insurance-provider",
                    "Label": "Insurance Provider",
                    "Type": "String",
                    "Value": "AIG"
                  },
                  {
                    "FieldIdentifier": "roof-area-m2",
                    "Label": "Roof Area m2",
                    "Type": "Decimal",
                    "Value": 1250.5
                  },
                  {
                    "FieldIdentifier": "has-sprinklers",
                    "Label": "Has Sprinklers",
                    "Type": "Boolean",
                    "Value": true
                  },
                  {
                    "FieldIdentifier": "last-fire-inspection",
                    "Label": "Last Fire Inspection",
                    "Type": "DateTime",
                    "Value": "2026-03-14T00:00:00Z"
                  },
                  {
                    "FieldIdentifier": "heating-type",
                    "Label": "Heating Type",
                    "Type": "Dropdown",
                    "Value": "Heat Pump"
                  },
                  {
                    "FieldIdentifier": "compliance-certificates",
                    "Label": "Compliance Certificates",
                    "Type": "MultiSelectDropdown",
                    "Value": [
                      "Asbestos",
                      "Electrical"
                    ]
                  }
                ],
                "Tags": [
                  "commercial",
                  "firesafety"
                ],
                "GlobalIdentifier": "bbf92d08-c903-4eb9-9fe5-3cd40dc2244a",
                "UpdatedDate": "0001-01-01T00:00:00",
                "IsArchived": false,
                "Status": "Active",
                "CountryIsoCode": "NZ",
                "VatElectedType": null,
                "VatEffectiveDate": null,
                "Manager": null,
                "UsageType": null,
                "CustomReference": null,
                "Name": "South Office",
                "ManagerGlobalIdentifier": "59d549c7-53c3-4ffd-838a-d126f798ebf8",
                "ManagerFirstName": "John",
                "ManagerLastName": "Snow",
                "ManagerEmail": "JohnSnow@email.com",
                "ManagerPhoneNumber": "09 9705526",
                "ManagerMobilePhoneNumber": "027 22545502",
                "Address": "1 / 500 High Street, Ahuriri, Napier Hawkes Bay 4000, New Zealand",
                "Type": "Office",
                "Longitude": "147.25382409999997",
                "Latitude": "-42.79149899999999",
                "ImageUrl": "https://us1.re-leased.com/photostream/Get?imageName=100.jpg&imageSize=full",
                "OwnerGlobalIdentifier": "6612d6fe-f1f1-4ffa-9f99-c51a43513b6a",
                "OwnerName": "B Smith",
                "OwnerFirstName": "Bill",
                "OwnerLastName": "Smith",
                "OwnerEmail": "billsmith@email.com",
                "OwnerPhoneNumber": "09 910545",
                "OwnerMobilePhoneNumber": "027 45684651",
                "PropertyId": 100,
                "ManagerId": 200,
                "OwnerId": 100,
                "FlatNumber": "1",
                "StreetNumber": "500",
                "Street": "High Street",
                "Suburb": "Ahuriri",
                "TownCity": "Napier",
                "StateRegion": "Hawkes Bay",
                "PostZipCode": "4000",
                "Country": "New Zealand",
                "DateOfPurchase": null,
                "PurchasePrice": null,
                "LandArea": null,
                "FloorArea": null,
                "NumberOfBedrooms": 4,
                "NumberOfBathrooms": 2.0,
                "AllowsPets": false,
                "AllowsSmoking": null,
                "AllowsUnattendedInspections": null,
                "IsFurnished": null
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Properties"
        ],
        "summary": "Archive (soft-delete) a property",
        "description": "Archives the property by setting it inactive. Returns 409 Conflict if the property has active leases,\r\nunsettled invoices, or open maintenance / inspection items.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/properties/{id}",
        "operationId": "Properties_Delete",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the property",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "d94ed44c-cc46-4ece-bd96-f93f7d92ad33"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "c4dbb77e-b9cb-4997-b9e0-2bc23587345b"
          }
        ],
        "responses": {
          "204": {
            "description": "NoContent"
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Properties"
        ],
        "summary": "Partially update a property's details",
        "description": "Updates specific fields of a property. Per RFC 5789 / RFC 7396, only fields present in the\r\nrequest body are modified - omitted fields are left unchanged.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/properties/{id}",
        "operationId": "Properties_PatchProperty",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the property",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "b45bac3a-dd78-41d5-9e7d-c01819101fae"
          },
          {
            "name": "propertyUpdateRequest",
            "in": "body",
            "description": "Fields to update. Omit fields you don't want to change.",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PropertyUpdateRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "4587b828-03f8-4f43-a7b7-90a63654e803"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      }
    },
    "/api/propertygroups": {
      "get": {
        "tags": [
          "PropertyGroups"
        ],
        "summary": "Retrieve a list of property groups",
        "description": "Retrieves a list of property groups for the authorised user.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/propertygroups",
        "operationId": "PropertyGroups_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "fromId",
            "in": "query",
            "description": "Optional: Gets property groups from a specified id for pagination",
            "required": false,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PropertyGroupDataModel"
            },
            "examples": {
              "application/json": {
                "PropertyGroups": [
                  {
                    "Id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                    "Title": "Downtown Portfolio",
                    "IsArchived": false,
                    "CommonProperty": {
                      "Id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                      "Title": "Downtown Portfolio Common"
                    },
                    "Properties": [
                      {
                        "Id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
                        "Title": "123 Main Street",
                        "IsCommonProperty": false
                      },
                      {
                        "Id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                        "Title": "Downtown Portfolio Common",
                        "IsCommonProperty": true
                      }
                    ],
                    "Company": {
                      "Id": "d4e5f6a7-b8c9-0123-defa-234567890123",
                      "Name": "Acme Property Management"
                    }
                  }
                ]
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      }
    },
    "/api/propertygroups/{id}": {
      "get": {
        "tags": [
          "PropertyGroups"
        ],
        "summary": "Retrieve a single property group by ID",
        "description": "Retrieves a single property group by its unique identifier.\r\n<br /><br />\r\nScope required: properties\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/propertygroups/{id}",
        "operationId": "PropertyGroups_GetById",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The property group ID (GUID)",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "c26e4b9b-0db7-4ddb-adc7-cc15d7df9ca7"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PropertyGroupSingleModel"
            },
            "examples": {
              "application/json": {
                "PropertyGroup": {
                  "Id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "Title": "Downtown Portfolio",
                  "IsArchived": false,
                  "CommonProperty": {
                    "Id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                    "Title": "Downtown Portfolio Common"
                  },
                  "Properties": [
                    {
                      "Id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
                      "Title": "123 Main Street",
                      "IsCommonProperty": false
                    },
                    {
                      "Id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                      "Title": "Downtown Portfolio Common",
                      "IsCommonProperty": true
                    }
                  ],
                  "Company": {
                    "Id": "d4e5f6a7-b8c9-0123-defa-234567890123",
                    "Name": "Acme Property Management"
                  }
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      }
    },
    "/api/rent-reviews": {
      "get": {
        "tags": [
          "RentReviews"
        ],
        "summary": "Retrieve a list of rent reviews",
        "description": "Retrieves the active rent reviews, completed and pending, on tenancies the authorised user can access, ordered by review date.\r\nArchived reviews are never returned.\r\n<br /><br />\r\nResults are paged. When more results exist, MetaData.NextPageUrl holds the request for the next page, with your filters kept.\r\n<br /><br />\r\nScope required: tenancies\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/rent-reviews",
        "operationId": "RentReviews_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "tenancyId",
            "in": "query",
            "description": "Only return reviews on this tenancy (Guid)",
            "required": false,
            "type": "string"
          },
          {
            "name": "propertyId",
            "in": "query",
            "description": "Only return reviews on tenancies on this property (Guid)",
            "required": false,
            "type": "string"
          },
          {
            "name": "reviewDateFrom",
            "in": "query",
            "description": "Only return reviews with a review date on or after this date (UTC). E.g. 2026-01-01",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "reviewDateTo",
            "in": "query",
            "description": "Only return reviews with a review date on or before this date (UTC). E.g. 2026-12-31",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only return reviews with this status: Pending, Overdue or Completed. Today is the company's local date.",
            "required": false,
            "type": "string",
            "enum": [
              "Pending",
              "Overdue",
              "Completed"
            ]
          },
          {
            "name": "updatedAfterDate",
            "in": "query",
            "description": "Only return reviews updated after this date (UTC). E.g. 2024-02-07T20:40:38",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "fromId",
            "in": "query",
            "description": "Gets the page of rent reviews after the specified rent review id. Use MetaData.NextPageUrl rather than setting this yourself.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of rent reviews per page, 1 to 100. Defaults to 100.",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/RentReviewDataModel"
            },
            "examples": {
              "application/json": {
                "RentReviews": [
                  {
                    "Id": "3bc27a6e-1b0a-4dd9-944a-77dbbafe1353",
                    "TenancyId": "f5adee12-22e4-405a-bf9d-da37695098aa",
                    "PropertyId": "5e9fc7cd-b5eb-4511-a57f-c513b89a9c5e",
                    "ReviewDateUtc": "2025-11-15T00:00:00Z",
                    "OriginalReviewDateUtc": "2025-11-01T00:00:00Z",
                    "ReviewType": {
                      "IsPercentageCalculated": true,
                      "Id": 3,
                      "Name": "CPI"
                    },
                    "Description": "Annual CPI review",
                    "Status": "Completed",
                    "CompletedDateUtc": "2025-11-22T00:00:00Z",
                    "PreviousAnnualRent": 116000.0,
                    "NewRent": 120000.0,
                    "NewRentFrequency": "Yearly",
                    "AdjustmentPercentage": 3.45,
                    "AssignedTo": {
                      "Name": "Jane Smith",
                      "Email": "jane.smith@example.com"
                    },
                    "ReminderDatesUtc": [
                      "2025-10-15T00:00:00Z"
                    ],
                    "UpdatedDateUtc": "2025-11-22T00:00:00Z"
                  },
                  {
                    "Id": "e407d31f-9c97-44ac-afbd-293f4acd1e26",
                    "TenancyId": "f5adee12-22e4-405a-bf9d-da37695098aa",
                    "PropertyId": "5e9fc7cd-b5eb-4511-a57f-c513b89a9c5e",
                    "ReviewDateUtc": "2027-01-15T00:00:00Z",
                    "OriginalReviewDateUtc": null,
                    "ReviewType": {
                      "IsPercentageCalculated": false,
                      "Id": 1,
                      "Name": "Market"
                    },
                    "Description": "Market review",
                    "Status": "Pending",
                    "CompletedDateUtc": null,
                    "PreviousAnnualRent": null,
                    "NewRent": null,
                    "NewRentFrequency": null,
                    "AdjustmentPercentage": null,
                    "AssignedTo": {
                      "Name": "Jane Smith",
                      "Email": "jane.smith@example.com"
                    },
                    "ReminderDatesUtc": [
                      "2026-12-15T00:00:00Z",
                      "2027-01-08T00:00:00Z"
                    ],
                    "UpdatedDateUtc": "2026-11-12T00:00:00Z"
                  }
                ],
                "MetaData": {
                  "NextPageUrl": "api/rent-reviews?tenancyId=f5adee12-22e4-405a-bf9d-da37695098aa&limit=2&fromId=c0a762f1-0560-4807-a488-2df50db6092d"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/tenancies/{id}/rent-reviews": {
      "get": {
        "tags": [
          "RentReviews"
        ],
        "summary": "Retrieve the rent reviews on a tenancy",
        "description": "Retrieves every active rent review on the tenancy, completed and pending, ordered by review date:\r\nthe full forward review schedule and the review history. Archived reviews are never returned.\r\n<br /><br />\r\nThe tenancy's CurrentReview field only holds the next review; use this endpoint for the full schedule.\r\n<br /><br />\r\nScope required: tenancies\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/tenancies/{id}/rent-reviews",
        "operationId": "RentReviews_GetForTenancy",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the tenancy",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "ce99e9f6-c25c-4ab1-b2b7-5ddf11cba2e5"
          },
          {
            "name": "fromId",
            "in": "query",
            "description": "Gets the page of rent reviews after the specified rent review id, which must be a review on this tenancy. Use MetaData.NextPageUrl rather than setting this yourself.",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of rent reviews per page, 1 to 100. When omitted, every review on the tenancy is returned in one response.",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/RentReviewDataModel"
            },
            "examples": {
              "application/json": {
                "RentReviews": [
                  {
                    "Id": "18e4d6b0-dbc3-49b2-a129-14d74645a67a",
                    "TenancyId": "d045cd33-b4b5-4738-b589-72805085bc9f",
                    "PropertyId": "b1651947-8469-4459-9de1-a6f3b999eb3f",
                    "ReviewDateUtc": "2025-11-15T00:00:00Z",
                    "OriginalReviewDateUtc": "2025-11-01T00:00:00Z",
                    "ReviewType": {
                      "IsPercentageCalculated": true,
                      "Id": 3,
                      "Name": "CPI"
                    },
                    "Description": "Annual CPI review",
                    "Status": "Completed",
                    "CompletedDateUtc": "2025-11-22T00:00:00Z",
                    "PreviousAnnualRent": 116000.0,
                    "NewRent": 120000.0,
                    "NewRentFrequency": "Yearly",
                    "AdjustmentPercentage": 3.45,
                    "AssignedTo": {
                      "Name": "Jane Smith",
                      "Email": "jane.smith@example.com"
                    },
                    "ReminderDatesUtc": [
                      "2025-10-15T00:00:00Z"
                    ],
                    "UpdatedDateUtc": "2025-11-22T00:00:00Z"
                  },
                  {
                    "Id": "c779d131-11aa-4746-808d-34abd7daaaf6",
                    "TenancyId": "d045cd33-b4b5-4738-b589-72805085bc9f",
                    "PropertyId": "b1651947-8469-4459-9de1-a6f3b999eb3f",
                    "ReviewDateUtc": "2027-01-15T00:00:00Z",
                    "OriginalReviewDateUtc": null,
                    "ReviewType": {
                      "IsPercentageCalculated": false,
                      "Id": 1,
                      "Name": "Market"
                    },
                    "Description": "Market review",
                    "Status": "Pending",
                    "CompletedDateUtc": null,
                    "PreviousAnnualRent": null,
                    "NewRent": null,
                    "NewRentFrequency": null,
                    "AdjustmentPercentage": null,
                    "AssignedTo": {
                      "Name": "Jane Smith",
                      "Email": "jane.smith@example.com"
                    },
                    "ReminderDatesUtc": [
                      "2026-12-15T00:00:00Z",
                      "2027-01-08T00:00:00Z"
                    ],
                    "UpdatedDateUtc": "2026-11-12T00:00:00Z"
                  }
                ],
                "MetaData": {
                  "NextPageUrl": "api/rent-reviews?tenancyId=d045cd33-b4b5-4738-b589-72805085bc9f&limit=2&fromId=455400a3-6919-4b23-b68d-9be97e583e57"
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/SingleSignOn": {
      "get": {
        "tags": [
          "SingleSignOn"
        ],
        "summary": "Request a single sign-on url",
        "description": "Retrieves a single sign-on url for the authorised user. This url can be used to sign into the Re-Leased web application.\r\n<br /><br />\r\nScope required: single-sign-on\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/singlesignon",
        "operationId": "SingleSignOn_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SingleSignOn"
            },
            "examples": {
              "application/json": {
                "SingleSignOnUrl": "https://us1.re-leased.com/Account/SignIn?singlesignon=token"
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      }
    },
    "/api/TaxTypes": {
      "get": {
        "tags": [
          "TaxTypes"
        ],
        "summary": "Retrieve a list of tax types",
        "description": "Retrieves a list of tax types for the company id supplied\r\n<br /><br />\r\nScope required: taxtypes\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/taxtypes/{companyId}",
        "operationId": "TaxTypes_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "required": false,
            "type": "string",
            "default": "38b25124-027a-4cb8-9d4d-a89e4ff88143"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TaxTypeResponseModel"
            },
            "examples": {
              "application/json": {
                "Data": [
                  {
                    "Code": "INPUT2",
                    "Rate": 15.0,
                    "Name": "15% GST on Expenses",
                    "CanApplyToExpenses": true
                  }
                ]
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/tenancies": {
      "get": {
        "tags": [
          "Tenancies"
        ],
        "summary": "Retrieve a list of tenancies",
        "description": "Retrieves a list of tenancies for the authorised user.\r\n<br /><br />\r\nScope required: tenancies\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/tenancies",
        "operationId": "Tenancies_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "fromId",
            "in": "query",
            "description": "Gets tenancies from specified id",
            "required": false,
            "type": "string"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of tenancies to retrieve. If null, no limit is applied.",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "updatedAfterDate",
            "in": "query",
            "description": "Gets tenancies updated after the specified date (UTC). E.g. 2024-02-07T20:40:38. If null, no date filter is applied.",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "includeCustomFields",
            "in": "query",
            "description": "Includes custom field values for each tenancy in the response. Only fields with a value are returned; empty when the company has no custom fields subscription.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "includeTags",
            "in": "query",
            "description": "Includes the names of the active tags assigned to each tenancy in the response. Tags are shared across the company's billing group, so a tag assigned by a sibling company is included.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TenancyDataModel"
            },
            "examples": {
              "application/json": {
                "Tenancies": [
                  {
                    "GlobalIdentifier": "591dfeac-f116-4b91-b2fe-8914cdae9c77",
                    "PropertyGlobalIdentifier": "be30d901-d41b-4961-9548-4cee8e8fff89",
                    "Name": "Office",
                    "StartDateUtc": "2026-11-15T11:56:47.2888564Z",
                    "IsActive": true,
                    "Status": "Active",
                    "RentInclusive": false,
                    "LeaseType": {
                      "Id": 10,
                      "Name": "Commercial"
                    },
                    "IndustryType": {
                      "Id": 25,
                      "Name": "Retail"
                    },
                    "IsInsideTheLandlordAndTenantAct": true,
                    "EndDateUtc": "2027-11-15T11:56:47.2888564Z",
                    "RentFrequencyLength": 1,
                    "RentFrequencyUnit": "Weeks",
                    "RentFrequencyAmount": 630.0,
                    "RentFrequencyAmountExcludingOpex": 600.0,
                    "AnnualRentAmount": 32760.0,
                    "RentPaidToUtc": "2027-04-14T11:56:47.2888564Z",
                    "RentPartPayment": 0.0,
                    "Tenants": [
                      {
                        "GlobalIdentifier": "00000000-0000-0000-0000-000000000000",
                        "Name": "Smith Industries",
                        "FirstName": "Bob",
                        "LastName": "Smith",
                        "MobileNumber": "+64 27 5458842",
                        "PhoneNumber": "+64 9 8745412",
                        "Email": "BobSmith@email.com",
                        "TenantId": 0
                      }
                    ],
                    "Areas": [
                      {
                        "AreaId": 100,
                        "AreaTitle": "Office"
                      }
                    ],
                    "Terms": [],
                    "Breaks": [
                      {
                        "Id": 1,
                        "LeaseBreakTypeId": 4,
                        "Title": "Year-5 break",
                        "Description": "Tenant option to break at year 5",
                        "Notes": "Six months' written notice required",
                        "Occurrences": [
                          {
                            "Id": 1,
                            "BreakDateUtc": "2031-11-15T11:56:47.2888564Z",
                            "FinalNotificationDateUtc": "2031-05-15T11:56:47.2888564Z",
                            "NoticeServedDateUtc": null,
                            "CompletedDateUtc": null,
                            "IsRollingBreak": false,
                            "Status": "Active"
                          }
                        ]
                      }
                    ],
                    "CurrentReview": {
                      "Id": 1,
                      "ReviewDateUtc": "2027-11-15T11:56:47.2888564Z",
                      "IsComplete": false,
                      "ReviewType": {
                        "Id": 7,
                        "Name": "CPI"
                      }
                    },
                    "Clause": null,
                    "NoticeToVacate": null,
                    "UpdatedDate": "2026-11-15T11:56:47.2888564Z",
                    "TenancyId": 500,
                    "PropertyId": 100,
                    "CustomFields": [
                      {
                        "FieldIdentifier": "use-class",
                        "Label": "Use Class",
                        "Type": "Dropdown",
                        "Value": "E (Commercial / Business / Service)"
                      },
                      {
                        "FieldIdentifier": "inside-lt-act",
                        "Label": "Inside L&T Act",
                        "Type": "Boolean",
                        "Value": true
                      },
                      {
                        "FieldIdentifier": "lease-notes",
                        "Label": "Lease Notes",
                        "Type": "String",
                        "Value": "Renewed early at tenant request"
                      }
                    ],
                    "Tags": [
                      "arrears",
                      "renewal"
                    ],
                    "Notes": "Tenant has first right of refusal on the adjoining unit.",
                    "ArrearsStatus": {
                      "Id": 3,
                      "Name": "Payment Plan"
                    }
                  }
                ],
                "MetaData": {
                  "NextPageUrl": null
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tenancies"
        ],
        "summary": "Create a new tenancy",
        "description": "Creates a new tenancy (lease shell + initial term) on the supplied property.\r\nRent, rent reviews, break clauses, deposits and additional contacts are added through\r\nfollow-up endpoints - this endpoint sets up the tenancy frame only.\r\n<br /><br />\r\nScope required: tenancies\r\n<br /><br /><b>Request header</b>: A new <i>Idempotency-Key</i> should be supplied with every POST request irrespective of the response type.<br />\r\nIf the tenancy is successfully created and the same <i>Idempotency-Key</i> is used in subsequent requests, the response returned will be the same tenancy created the first time.\r\n<i>Idempotency-Key</i> can be a string or Guid.\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/tenancies",
        "operationId": "Tenancies_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "createTenancyRequest",
            "in": "body",
            "description": "Details for the new tenancy",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateTenancyRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "198f2092-f354-4006-acfa-516eac8f366f"
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/TenancyData"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/tenancies/{id}": {
      "get": {
        "tags": [
          "Tenancies"
        ],
        "summary": "Retrieve a single tenancy by id",
        "description": "Retrieves a single tenancy by id for the authorised user.\r\n<br /><br />\r\nScope required: tenancies\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/tenancies/{id}",
        "operationId": "Tenancies_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the tenancy",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "cc3c8841-ea51-4e32-adf7-5cfa55496b38"
          },
          {
            "name": "includeCustomFields",
            "in": "query",
            "description": "Includes custom field values for the tenancy in the response. Only fields with a value are returned; empty when the company has no custom fields subscription.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "includeTags",
            "in": "query",
            "description": "Includes the names of the active tags assigned to the tenancy in the response. Tags are shared across the company's billing group, so a tag assigned by a sibling company is included.",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TenancyData"
            },
            "examples": {
              "application/json": {
                "Tenancies": [
                  {
                    "GlobalIdentifier": "aaaf69fb-b6e9-46d2-91c4-929410da3a9e",
                    "PropertyGlobalIdentifier": "c13b874a-e096-4c74-b403-8962df885822",
                    "Name": "Office",
                    "StartDateUtc": "2026-11-15T11:56:47.2888564Z",
                    "IsActive": true,
                    "Status": "Active",
                    "RentInclusive": false,
                    "LeaseType": {
                      "Id": 10,
                      "Name": "Commercial"
                    },
                    "IndustryType": {
                      "Id": 25,
                      "Name": "Retail"
                    },
                    "IsInsideTheLandlordAndTenantAct": true,
                    "EndDateUtc": "2027-11-15T11:56:47.2888564Z",
                    "RentFrequencyLength": 1,
                    "RentFrequencyUnit": "Weeks",
                    "RentFrequencyAmount": 630.0,
                    "RentFrequencyAmountExcludingOpex": 600.0,
                    "AnnualRentAmount": 32760.0,
                    "RentPaidToUtc": "2027-04-14T11:56:47.2888564Z",
                    "RentPartPayment": 0.0,
                    "Tenants": [
                      {
                        "GlobalIdentifier": "00000000-0000-0000-0000-000000000000",
                        "Name": "Smith Industries",
                        "FirstName": "Bob",
                        "LastName": "Smith",
                        "MobileNumber": "+64 27 5458842",
                        "PhoneNumber": "+64 9 8745412",
                        "Email": "BobSmith@email.com",
                        "TenantId": 0
                      }
                    ],
                    "Areas": [
                      {
                        "AreaId": 100,
                        "AreaTitle": "Office"
                      }
                    ],
                    "Terms": [],
                    "Breaks": [
                      {
                        "Id": 1,
                        "LeaseBreakTypeId": 4,
                        "Title": "Year-5 break",
                        "Description": "Tenant option to break at year 5",
                        "Notes": "Six months' written notice required",
                        "Occurrences": [
                          {
                            "Id": 1,
                            "BreakDateUtc": "2031-11-15T11:56:47.2888564Z",
                            "FinalNotificationDateUtc": "2031-05-15T11:56:47.2888564Z",
                            "NoticeServedDateUtc": null,
                            "CompletedDateUtc": null,
                            "IsRollingBreak": false,
                            "Status": "Active"
                          }
                        ]
                      }
                    ],
                    "CurrentReview": {
                      "Id": 1,
                      "ReviewDateUtc": "2027-11-15T11:56:47.2888564Z",
                      "IsComplete": false,
                      "ReviewType": {
                        "Id": 7,
                        "Name": "CPI"
                      }
                    },
                    "Clause": null,
                    "NoticeToVacate": null,
                    "UpdatedDate": "2026-11-15T11:56:47.2888564Z",
                    "TenancyId": 500,
                    "PropertyId": 100,
                    "CustomFields": [
                      {
                        "FieldIdentifier": "use-class",
                        "Label": "Use Class",
                        "Type": "Dropdown",
                        "Value": "E (Commercial / Business / Service)"
                      },
                      {
                        "FieldIdentifier": "inside-lt-act",
                        "Label": "Inside L&T Act",
                        "Type": "Boolean",
                        "Value": true
                      },
                      {
                        "FieldIdentifier": "lease-notes",
                        "Label": "Lease Notes",
                        "Type": "String",
                        "Value": "Renewed early at tenant request"
                      }
                    ],
                    "Tags": [
                      "arrears",
                      "renewal"
                    ],
                    "Notes": "Tenant has first right of refusal on the adjoining unit.",
                    "ArrearsStatus": {
                      "Id": 3,
                      "Name": "Payment Plan"
                    }
                  }
                ],
                "MetaData": {
                  "NextPageUrl": null
                }
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tenancies"
        ],
        "summary": "Archive a tenancy",
        "description": "Archives the tenancy, mirroring the internal \"Archive Tenancy\" web flow. Inspection and\r\ntenant-insurance archival cascades run as part of the operation. No business blockers\r\n(outstanding invoices, ledger balances, etc.) prevent the archive.\r\n<br /><br />\r\nNote: archiving does not void or finalise outstanding invoices, credit notes or repeating\r\ninvoices, and does not set an end date - it closes the tenancy only.\r\n<br /><br />\r\nScope required: tenancies\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/tenancies/{id}",
        "operationId": "Tenancies_Delete",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the tenancy",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "1f5346e8-831d-4604-9138-f59276b4c9d2"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "c2184cb3-f581-444a-be2c-d11e7c55656a"
          }
        ],
        "responses": {
          "204": {
            "description": "NoContent"
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Tenancies"
        ],
        "summary": "Update a tenancy",
        "description": "Updates an existing tenancy. Only the fields included in the request body are changed;\r\nany field you leave out is left as-is.\r\n<br /><br />\r\nScope required: tenancies\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/tenancies/{id}",
        "operationId": "Tenancies_Patch",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (Guid) of the tenancy",
            "required": true,
            "type": "string",
            "format": "uuid",
            "default": "0efc5097-5965-42a4-b8f3-e50da91bf4de"
          },
          {
            "name": "updateTenancyRequest",
            "in": "body",
            "description": "Fields to update. Omit fields you don't want to change.",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateTenancyRequest"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "idempotency key",
            "required": true,
            "type": "string",
            "default": "cf81d9e5-4a43-41b1-895f-938bfdfcafc6"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TenancyData"
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "404": {
            "description": "NotFound",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/ErrorResponseModel"
            }
          }
        }
      }
    },
    "/api/TrustAccounts": {
      "get": {
        "tags": [
          "TrustAccounts"
        ],
        "summary": "Retrieve a list of trust accounts",
        "description": "Retrieves a list of trust accounts for the authorised user.\r\n<br /><br />\r\nScope required: trustaccounts\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/trustaccounts",
        "operationId": "TrustAccounts_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TrustAccountDataModel"
            },
            "examples": {
              "application/json": {
                "TrustAccounts": [
                  {
                    "GlobalIdentifier": "1e3a0048-e753-4688-957d-b65aad68dafb",
                    "Name": "100 - Business Bank Account",
                    "CustomerGlobalIdentifier": "85506ac6-2b6b-4edb-a6fc-a40e6e482e4d"
                  },
                  {
                    "GlobalIdentifier": "a1433ad5-a712-4324-b3d5-19c6db11ab7f",
                    "Name": "200 - Holding Bank Account",
                    "CustomerGlobalIdentifier": "c5f777f8-17e6-49d0-ad49-04b5b3fbcf65"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Authorization denied"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      }
    },
    "/api/User": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Retrieve a user",
        "description": "Retrieves details of the authorised user.\r\n<br /><br />\r\nScope required: user\r\n<br /><br />\r\nProduction Endpoint: https://api.re-leased.com/api/user",
        "operationId": "User_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": true,
            "type": "string",
            "default": "Bearer {access_token}"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/UserData"
            },
            "examples": {
              "application/json": {
                "GlobalIdentifier": "f8c94d24-b810-4882-b085-c2cc2dac7ab5",
                "FirstName": "John",
                "LastName": "Snow",
                "Email": "JohnSnow@email.com",
                "Id": 5000
              }
            }
          },
          "400": {
            "description": "BadRequest",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "InternalServerError",
            "schema": {
              "$ref": "#/definitions/Result"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "AccountResponseModel": {
      "type": "object",
      "properties": {
        "Data": {
          "description": "Response envelope",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Account"
          }
        }
      }
    },
    "Account": {
      "type": "object",
      "properties": {
        "Code": {
          "description": "Account code",
          "type": "string"
        },
        "Name": {
          "description": "Name of the account",
          "type": "string"
        },
        "UpdatedDate": {
          "format": "date-time",
          "description": "The date and time (UTC) the entity was last updated",
          "type": "string"
        }
      }
    },
    "ErrorResponseModel": {
      "description": "Error Response for a request",
      "type": "object",
      "properties": {
        "Type": {
          "description": "A URI reference that identifies the problem type",
          "type": "string"
        },
        "Title": {
          "description": "A short, human-readable summary of the problem type",
          "type": "string"
        },
        "Status": {
          "description": "The HTTP status code generated by the origin server for this occurrence of the problem",
          "enum": [
            "Continue",
            "SwitchingProtocols",
            "OK",
            "Created",
            "Accepted",
            "NonAuthoritativeInformation",
            "NoContent",
            "ResetContent",
            "PartialContent",
            "MultipleChoices",
            "Ambiguous",
            "MovedPermanently",
            "Moved",
            "Found",
            "Redirect",
            "SeeOther",
            "RedirectMethod",
            "NotModified",
            "UseProxy",
            "Unused",
            "TemporaryRedirect",
            "RedirectKeepVerb",
            "BadRequest",
            "Unauthorized",
            "PaymentRequired",
            "Forbidden",
            "NotFound",
            "MethodNotAllowed",
            "NotAcceptable",
            "ProxyAuthenticationRequired",
            "RequestTimeout",
            "Conflict",
            "Gone",
            "LengthRequired",
            "PreconditionFailed",
            "RequestEntityTooLarge",
            "RequestUriTooLong",
            "UnsupportedMediaType",
            "RequestedRangeNotSatisfiable",
            "ExpectationFailed",
            "UpgradeRequired",
            "InternalServerError",
            "NotImplemented",
            "BadGateway",
            "ServiceUnavailable",
            "GatewayTimeout",
            "HttpVersionNotSupported"
          ],
          "type": "string"
        },
        "Detail": {
          "description": "A human-readable explanation specific to this occurrence of the problem",
          "type": "string"
        },
        "Instance": {
          "description": "A URI reference that identifies the specific occurrence of the problem",
          "type": "string"
        },
        "Errors": {
          "description": "Array of validation or exception error messages",
          "type": "array",
          "items": {
            "$ref": "#/definitions/ValidationError"
          }
        }
      }
    },
    "ValidationError": {
      "type": "object",
      "properties": {
        "Code": {
          "type": "string",
          "readOnly": true
        },
        "Message": {
          "type": "string"
        }
      }
    },
    "AreasDataModel": {
      "description": "Paginated collection of areas for a property.",
      "required": [
        "Areas"
      ],
      "type": "object",
      "properties": {
        "Areas": {
          "description": "Collection of areas",
          "type": "array",
          "items": {
            "$ref": "#/definitions/AreaData"
          }
        },
        "Pagination": {
          "$ref": "#/definitions/Pagination"
        },
        "TotalCount": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "AreaData": {
      "description": "Area data",
      "required": [
        "GlobalIdentifier",
        "PropertyGlobalIdentifier",
        "Title"
      ],
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique area identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "PropertyGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique identifier of the property the area belongs to",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "description": "Title / name of the area",
          "type": "string"
        },
        "Notes": {
          "description": "Free-text notes for the area. Null if not set.",
          "type": "string"
        },
        "AreaTypeId": {
          "format": "int32",
          "description": "Identifier of the area type",
          "type": "integer"
        },
        "AreaTypeName": {
          "description": "Name of the area type",
          "type": "string"
        },
        "SuiteNumber": {
          "description": "Suite number. Null if not set.",
          "type": "string"
        },
        "FloorNumber": {
          "format": "int32",
          "description": "Floor number. Null if not set.",
          "type": "integer"
        },
        "Size": {
          "format": "double",
          "description": "Floor area, in the unit given by SizeUnit. Null for Car Park / Non-Measurable areas.",
          "type": "number"
        },
        "SizeUnit": {
          "description": "Unit for Size (SquareMetre, SquareFoot, Acre, Hectare). Null for Car Park / Non-Measurable areas.",
          "type": "string"
        },
        "DefaultRent": {
          "format": "double",
          "description": "Default (market) rent for the area. Null if not set.",
          "type": "number"
        },
        "EpcRatingId": {
          "format": "int32",
          "description": "EPC rating identifier. Null if not set.",
          "type": "integer"
        },
        "EpcRating": {
          "description": "EPC rating label. Null if not set.",
          "type": "string"
        },
        "VatElected": {
          "format": "int32",
          "description": "VAT-elected option. Null if not set.",
          "type": "integer"
        },
        "IsActive": {
          "description": "Active state of the area",
          "type": "boolean"
        },
        "IsOccupied": {
          "description": "Whether the area is currently allocated to one or more active tenancies",
          "type": "boolean"
        },
        "AllocatedToTenancyIds": {
          "description": "Identifiers of the active tenancies this area is allocated to. Empty if unallocated.",
          "type": "array",
          "items": {
            "format": "uuid",
            "type": "string",
            "example": "00000000-0000-0000-0000-000000000000"
          }
        },
        "UpdatedDate": {
          "format": "date-time",
          "description": "UTC timestamp of the area's most recent audited change - the same \"Last updated\" value shown in the\r\nweb UI. Null when the area has no audited changes.",
          "type": "string"
        },
        "CustomFields": {
          "description": "Custom field values for the area. Only present when the request opted in via\r\nincludeCustomFields=true; empty when the company has no custom fields subscription,\r\nno definitions, or no values set on this area. Only fields with a value are returned.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomFieldEntry"
          }
        }
      }
    },
    "Pagination": {
      "type": "object",
      "properties": {
        "Offset": {
          "format": "int32",
          "type": "integer"
        },
        "Limit": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "CustomFieldEntry": {
      "description": "A single custom field value on a property or tenancy response. Entries are self-describing -\r\nthe label, slug identifier and value type travel with every entry - so consumers don't need\r\na separate definitions lookup. Only fields that hold a value on the record are returned.",
      "type": "object",
      "properties": {
        "FieldIdentifier": {
          "description": "Stable slug identifier derived from the label, e.g. \"companies-house-number\".",
          "type": "string"
        },
        "Label": {
          "description": "Display name of the custom field as configured by the company.",
          "type": "string"
        },
        "Type": {
          "description": "Value type. One of: String, Decimal, Boolean, DateTime, Dropdown, MultiSelectDropdown.",
          "type": "string"
        },
        "Value": {
          "description": "The field value, typed per {ReLeased.PublicApi.App.Api.Models.CustomFieldEntry.Type}: string, number, boolean, ISO 8601 UTC\r\ndate-time string, a dropdown option label, or an array of option labels for\r\nMultiSelectDropdown.",
          "type": "object"
        }
      }
    },
    "CreateAreaRequest": {
      "description": "Object used to create a new area on a property.",
      "required": [
        "Title",
        "AreaTypeId"
      ],
      "type": "object",
      "properties": {
        "Title": {
          "description": "Title / name of the area. Must be unique among active areas on the property.",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "AreaTypeId": {
          "format": "int32",
          "description": "Identifier of the area type (a property-level lookup). Determines whether a size is allowed:\r\nGeneral (measurable) types require a size; Car Park and Non-Measurable types must not have one.",
          "type": "integer"
        },
        "Size": {
          "format": "double",
          "description": "Floor area of the space, in the unit given by {ReLeased.PublicApi.App.Api.Models.Areas.Requests.CreateAreaRequest.SizeUnit}. Required for General\r\n(measurable) area types; must be omitted for Car Park / Non-Measurable types.",
          "type": "number"
        },
        "SizeUnit": {
          "description": "Unit for {ReLeased.PublicApi.App.Api.Models.Areas.Requests.CreateAreaRequest.Size}. One of: SquareMetre, SquareFoot, Acre, Hectare.",
          "type": "string"
        },
        "Notes": {
          "description": "Optional free-text notes for the area.",
          "type": "string"
        },
        "SuiteNumber": {
          "description": "Optional suite number for the area.",
          "maxLength": 20,
          "minLength": 0,
          "type": "string"
        },
        "FloorNumber": {
          "format": "int32",
          "description": "Optional floor number (between -999 and 999).",
          "type": "integer"
        },
        "DefaultRent": {
          "format": "double",
          "description": "Optional default (market) rent for the area.",
          "type": "number"
        },
        "VatElected": {
          "format": "int32",
          "description": "Optional VAT-elected option for the area.",
          "type": "integer"
        },
        "EpcRatingId": {
          "format": "int32",
          "description": "Optional EPC rating identifier (a property-level lookup in the caller's customer scope).",
          "type": "integer"
        },
        "CustomFields": {
          "description": "Optional custom field values to set on the new area, each identified by its FieldIdentifier.\r\nDropdowns are written by option label.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomFieldWriteEntry"
          }
        }
      },
      "example": {
        "Title": "Suite 101",
        "AreaTypeId": 42,
        "Size": 150.5,
        "SizeUnit": "SquareMetre",
        "Notes": "Corner office suite",
        "SuiteNumber": "101",
        "FloorNumber": 1,
        "DefaultRent": 32760.0,
        "CustomFields": [
          {
            "FieldIdentifier": "floor-covering",
            "Value": "Carpet"
          },
          {
            "FieldIdentifier": "fire-rating",
            "Value": "A1"
          }
        ]
      }
    },
    "CustomFieldWriteEntry": {
      "description": "A single custom field value supplied on a create / update request. The write counterpart of\r\n{ReLeased.PublicApi.App.Api.Models.CustomFieldEntry} minus the server-derived Label / Type: identify the field by its\r\nstable slug and supply a value typed per the field's definition.",
      "type": "object",
      "properties": {
        "FieldIdentifier": {
          "description": "Stable slug identifying the custom field, e.g. \"companies-house-number\".",
          "type": "string"
        },
        "Value": {
          "description": "The value to write, typed per the field's definition: a string, number, boolean, ISO 8601 UTC\r\ndate-time string, a dropdown option label, or an array of option labels for a multi-select.\r\nA null / empty value clears the field. Dropdowns are written by label; option ids are never accepted.",
          "type": "object"
        }
      }
    },
    "UpdateAreaRequest": {
      "description": "Object used to update an existing area. Only the fields included in the request body are changed;\r\nany field left out is unchanged. PropertyGlobalIdentifier is intentionally absent - areas cannot\r\nmove between properties.",
      "type": "object",
      "properties": {
        "Title": {
          "description": "New title for the area. Must be unique among active areas on the property.",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "AreaTypeId": {
          "format": "int32",
          "description": "New area type identifier. Changing to a Car Park / Non-Measurable type clears the size.",
          "type": "integer"
        },
        "Size": {
          "format": "double",
          "description": "New floor area, in the unit given by {ReLeased.PublicApi.App.Api.Models.Areas.Requests.UpdateAreaRequest.SizeUnit}. Only valid for General (measurable)\r\narea types.",
          "type": "number"
        },
        "SizeUnit": {
          "description": "Unit for {ReLeased.PublicApi.App.Api.Models.Areas.Requests.UpdateAreaRequest.Size}. One of: SquareMetre, SquareFoot, Acre, Hectare.",
          "type": "string"
        },
        "Notes": {
          "description": "New free-text notes for the area.",
          "type": "string"
        },
        "SuiteNumber": {
          "description": "New suite number for the area.",
          "maxLength": 20,
          "minLength": 0,
          "type": "string"
        },
        "FloorNumber": {
          "format": "int32",
          "description": "New floor number (between -999 and 999).",
          "type": "integer"
        },
        "DefaultRent": {
          "format": "double",
          "description": "New default (market) rent for the area.",
          "type": "number"
        },
        "VatElected": {
          "format": "int32",
          "description": "New VAT-elected option for the area.",
          "type": "integer"
        },
        "EpcRatingId": {
          "format": "int32",
          "description": "New EPC rating identifier (a property-level lookup in the caller's customer scope).",
          "type": "integer"
        },
        "CustomFields": {
          "description": "Optional custom field values to set. Omitting CustomFields (or sending an empty array) leaves all\r\ncustom fields unchanged; a listed field with a null / empty value clears it. Dropdowns are written\r\nby option label.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomFieldWriteEntry"
          }
        }
      },
      "example": {
        "Title": "Suite 101 - Renamed",
        "SuiteNumber": "101A",
        "DefaultRent": 35000.0,
        "CustomFields": [
          {
            "FieldIdentifier": "floor-covering",
            "Value": "Vinyl"
          }
        ]
      }
    },
    "BudgetDataModel": {
      "description": "A page of budgets",
      "required": [
        "Budgets"
      ],
      "type": "object",
      "properties": {
        "Budgets": {
          "description": "Collection of budget headers (schedules and tenancy allocations are only returned by the single budget endpoint)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/BudgetData"
          }
        },
        "MetaData": {
          "$ref": "#/definitions/MetaData",
          "description": "Paging details. NextPageUrl is the request for the next page, or null when this is the last page."
        }
      }
    },
    "BudgetData": {
      "description": "An outgoings / service charge budget for one property and budget period\r\n(called a service charge budget in the UK and an outgoings budget in Australia and New Zealand)",
      "required": [
        "Id",
        "PropertyId",
        "PeriodStartDate",
        "PeriodEndDate",
        "Status",
        "UpdatedDateUtc"
      ],
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Unique budget identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "PropertyId": {
          "format": "uuid",
          "description": "Unique identifier of the property the budget belongs to. For a budget shared across a property group, this is the group's common property.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "description": "Budget title, e.g. \"FY26 Outgoings\"",
          "type": "string"
        },
        "PeriodStartDate": {
          "description": "First day of the budget period, as a date in the company's local time zone (yyyy-MM-dd)",
          "type": "string"
        },
        "PeriodEndDate": {
          "description": "Last day of the budget period, as a date in the company's local time zone (yyyy-MM-dd)",
          "type": "string"
        },
        "Status": {
          "description": "Budget status, matching the Budget Hub in Re-Leased:\r\n<br />- <b>Draft</b>: being prepared and not yet approved. Draft budgets are only listed when requested with status=Draft.\r\n<br />- <b>Approved</b>: approved and being billed to tenancies; actual expenditure accrues against it.\r\n<br />- <b>Locked</b>: the period has closed and the budget is locked for year-end reconciliation (see LockedDateUtc).\r\n<br />- <b>Reconciled</b>: the year-end reconciliation is complete and balancing charges have been raised (see ReconciledDateUtc).",
          "enum": [
            "Draft",
            "Approved",
            "Locked",
            "Reconciled"
          ],
          "type": "string"
        },
        "LockedDateUtc": {
          "format": "date-time",
          "description": "Date the budget was locked for reconciliation (UTC). Null unless Status is Locked or Reconciled.",
          "type": "string"
        },
        "ReconciledDateUtc": {
          "format": "date-time",
          "description": "Date the reconciliation was completed (UTC). Null unless Status is Reconciled.",
          "type": "string"
        },
        "PreviousBudgetId": {
          "format": "uuid",
          "description": "Unique identifier of the budget this one was rolled over from (normally the previous period's budget). Null when it was not rolled over.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "TotalBudgeted": {
          "format": "double",
          "description": "Total budgeted expenditure for the period (excluding tax), as the Budget Hub shows it. Counts every expense code on the budget, including codes on archived schedules and codes on no schedule, which Schedules leaves out, so it can differ from the sum of Schedules[].Accounts[].Budgeted.",
          "type": "number"
        },
        "TotalActual": {
          "format": "double",
          "description": "Total actual expenditure (excluding tax), as stored when schedules are reconciled. Counts the same expense codes as TotalBudgeted, so it can differ from the sum of Schedules[].Accounts[].Actual. Null until any actual is stored, so normally null on Draft and Approved budgets and set on Locked and Reconciled ones.",
          "type": "number"
        },
        "UpdatedDateUtc": {
          "format": "date-time",
          "description": "Date the budget was last updated (UTC)",
          "type": "string"
        },
        "Schedules": {
          "description": "The budget's schedules (cost groups) with each account's budgeted and actual amounts.\r\nOnly present when the request opted in via includeSchedules=true.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/BudgetSchedule"
          }
        },
        "TenancyAllocations": {
          "description": "What each tenancy area is budgeted to contribute for the year.\r\nOnly present when the request opted in via includeTenancyAllocations=true.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/BudgetTenancyAllocation"
          }
        },
        "Reconciliation": {
          "$ref": "#/definitions/BudgetReconciliation",
          "description": "The year-end reconciliation summary and each tenancy's balancing charge.\r\nOnly present when the request opted in via includeReconciliation=true, and then null unless Status is Locked or Reconciled."
        }
      }
    },
    "MetaData": {
      "type": "object",
      "properties": {
        "NextPageUrl": {
          "description": "Url for next page",
          "type": "string"
        }
      }
    },
    "BudgetSchedule": {
      "description": "A budget schedule: a group of expense accounts shared between a set of areas on one apportionment basis",
      "required": [
        "Id"
      ],
      "type": "object",
      "properties": {
        "Id": {
          "format": "int32",
          "description": "Schedule identifier (a number, unique across schedules). Schedules are only reached through their budget.",
          "type": "integer"
        },
        "Title": {
          "description": "Schedule title, e.g. \"Building outgoings\"",
          "type": "string"
        },
        "Basis": {
          "description": "How the schedule's costs are apportioned between its areas:\r\n<br />- <b>TenantPercentages</b>: a percentage entered for each tenancy.\r\n<br />- <b>PercentageOfFloorArea</b>: each area's share of the floor area of the schedule's areas.\r\n<br />- <b>PercentageOfAllBudgetAreas</b>: each area's share of the floor area of every area on the budget.\r\n<br />- <b>PercentageOfAllScheduleAreas</b>: each area's share of the floor area of every area on any of the budget's schedules.\r\n<br />- <b>None</b>: no basis set. Null when not recorded.",
          "type": "string"
        },
        "Accounts": {
          "description": "The expense accounts on the schedule",
          "type": "array",
          "items": {
            "$ref": "#/definitions/BudgetScheduleAccount"
          }
        }
      }
    },
    "BudgetTenancyAllocation": {
      "description": "What one tenancy area is budgeted to contribute to a budget",
      "type": "object",
      "properties": {
        "TenancyId": {
          "format": "uuid",
          "description": "Unique identifier of the tenancy",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "AreaId": {
          "format": "uuid",
          "description": "Unique identifier of the area the allocation is for. Always set for by-area budgets.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "AnnualBudgetedAmount": {
          "format": "double",
          "description": "The tenancy's budgeted contribution for the year (excluding tax). Null when no budgeted amount has been entered for it.",
          "type": "number"
        }
      }
    },
    "BudgetReconciliation": {
      "description": "A budget's year-end reconciliation: actual expenditure against what tenancies were invoiced, matching the reconciliation summary in Re-Leased",
      "type": "object",
      "properties": {
        "ExpenditureToDate": {
          "format": "double",
          "description": "Actual expenditure recorded against the budget for the period (excluding tax)",
          "type": "number"
        },
        "InvoicedToTenants": {
          "format": "double",
          "description": "Total invoiced to tenancies against the budget during the period (excluding tax)",
          "type": "number"
        },
        "BalancingAmount": {
          "format": "double",
          "description": "Total balancing amount across all tenancies (excluding tax). Positive is owed by tenants; negative is refunded or credited to them.",
          "type": "number"
        },
        "OwnerContribution": {
          "format": "double",
          "description": "The landlord's share of the expenditure, e.g. for vacant areas or costs capped for tenants (excluding tax)",
          "type": "number"
        },
        "Tenancies": {
          "description": "The balancing charge for each tenancy area, matching the balancing charges page in Re-Leased",
          "type": "array",
          "items": {
            "$ref": "#/definitions/BudgetTenancyReconciliation"
          }
        }
      }
    },
    "BudgetScheduleAccount": {
      "description": "An expense account line on a budget schedule",
      "type": "object",
      "properties": {
        "AccountCode": {
          "description": "Chart of accounts code",
          "type": "string"
        },
        "AccountName": {
          "description": "Chart of accounts name",
          "type": "string"
        },
        "Budgeted": {
          "format": "double",
          "description": "Budgeted cost for the period (excluding tax)",
          "type": "number"
        },
        "Actual": {
          "format": "double",
          "description": "Actual cost for the period (excluding tax), as stored when the schedule is reconciled. Null until then, so normally null on Draft and Approved budgets.",
          "type": "number"
        }
      }
    },
    "BudgetTenancyReconciliation": {
      "description": "One tenancy area's year-end balancing charge on a budget reconciliation",
      "type": "object",
      "properties": {
        "TenancyId": {
          "format": "uuid",
          "description": "Unique identifier of the tenancy. Null for a vacant area, whose share falls to the owner.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "AreaId": {
          "format": "uuid",
          "description": "Unique identifier of the area",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "InvoicedAmount": {
          "format": "double",
          "description": "Amount invoiced to the tenancy against the budget during the period (excluding tax)",
          "type": "number"
        },
        "BalancingAmount": {
          "format": "double",
          "description": "The tenancy's balancing charge (excluding tax). Positive is owed by the tenant (an invoice); negative is a refund or credit to the tenant (a credit note).",
          "type": "number"
        },
        "Status": {
          "description": "Progress of the balancing charge:\r\n<br />- <b>New</b>: calculated but no invoice or credit note raised yet.\r\n<br />- <b>Processing</b>: the invoice or credit note is being raised.\r\n<br />- <b>Completed</b>: the invoice or credit note has been raised (see InvoiceId and CreditNoteId).\r\n<br />- <b>Failed</b>: raising the invoice or credit note failed and needs attention in Re-Leased.",
          "enum": [
            "New",
            "Processing",
            "Completed",
            "Failed"
          ],
          "type": "string"
        },
        "InvoiceId": {
          "format": "uuid",
          "description": "Unique identifier of the balancing invoice, for GET /api/invoices/{id}. Null when no invoice has been raised.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "CreditNoteId": {
          "format": "uuid",
          "description": "Unique identifier of the balancing credit note, for GET /api/credit-notes/{id}. Null when no credit note has been raised.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        }
      }
    },
    "CompanyResponseModel": {
      "type": "object",
      "properties": {
        "Data": {
          "$ref": "#/definitions/Company",
          "description": "Response envelope"
        }
      }
    },
    "Company": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Company Id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "Company name",
          "type": "string"
        },
        "TimeZone": {
          "description": "Company timezone",
          "type": "string"
        },
        "Culture": {
          "description": "Company culture",
          "type": "string"
        }
      }
    },
    "CompanyListResponseModel": {
      "type": "object",
      "properties": {
        "Data": {
          "description": "Response envelope",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Company"
          }
        }
      }
    },
    "ContactResponseModel": {
      "type": "object",
      "properties": {
        "Data": {
          "description": "Response envelope",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Contact"
          }
        },
        "MetaData": {
          "$ref": "#/definitions/MetaData",
          "description": "Meta data of the result"
        }
      }
    },
    "Contact": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Contact Id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "CompanyMaps": {
          "description": "List of Companies the contact is associated with",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CompanyMap"
          }
        },
        "Name": {
          "description": "Contact name",
          "type": "string"
        },
        "CorrespondenceName": {
          "description": "Optional: Correspondence Name - defaults to Name if not set.",
          "type": "string"
        },
        "FirstName": {
          "description": "Contact's first name",
          "type": "string"
        },
        "LastName": {
          "description": "Contact's last name",
          "type": "string"
        },
        "Email": {
          "description": "Contact's email address",
          "type": "string"
        },
        "UpdatedDateTime": {
          "format": "date-time",
          "description": "The time the contact was last updated.\r\nContacts are inconsistent and are not called UpdatedDate.",
          "type": "string"
        },
        "Category": {
          "description": "Contact's category",
          "enum": [
            "Contact",
            "Company",
            "Owner",
            "Bond Authority",
            "Owner Group",
            "Creditor",
            "Preferred Supplier",
            "Current Tenants"
          ],
          "type": "string"
        },
        "Status": {
          "description": "Contact's status (Draft, AwaitingApproval, Approved, Deleted)",
          "enum": [
            "Draft",
            "AwaitingApproval",
            "Approved",
            "Deleted"
          ],
          "type": "string"
        },
        "FaxPhone": {
          "$ref": "#/definitions/PhoneNumber",
          "description": "Contact's fax number"
        },
        "MobilePhone": {
          "$ref": "#/definitions/PhoneNumber",
          "description": "Contact's mobile phone number"
        },
        "DirectDialPhone": {
          "$ref": "#/definitions/PhoneNumber",
          "description": "Contact's direct dial phone number"
        },
        "TelephoneNumber": {
          "$ref": "#/definitions/PhoneNumber",
          "description": "Contact's Telephone number"
        },
        "PhysicalAddress": {
          "$ref": "#/definitions/Address",
          "description": "Contact's Physical address"
        },
        "PostalAddress": {
          "$ref": "#/definitions/Address",
          "description": "Contact's Postal address"
        },
        "TaxBusinessNumber": {
          "description": "Contact's Tax Business Number",
          "type": "string"
        },
        "TaxNumber": {
          "description": "Contact's Tax Number",
          "type": "string"
        },
        "PaymentMethod": {
          "description": "Payment method used to pay the contact (e.g. EFT, CHQ, BPAY). Only present for\r\nOwner and Creditor contacts on Trust Accounting companies; omitted from the response otherwise.",
          "type": "string"
        },
        "BankAccounts": {
          "description": "Active bank accounts the contact is paid into. Omitted from the response when the contact has none.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/ResponseBankAccount"
          }
        },
        "OwnerDisbursementAccount": {
          "description": "Disbursement account Code used to pay an Owner (the same value accepted on create). Only present\r\nfor Owner contacts on Trust Accounting companies; omitted from the response otherwise.",
          "type": "string"
        },
        "DisbursementProfileIds": {
          "description": "Disbursement profile identifiers assigned to an Owner (the same Guids accepted on create). Omitted from\r\nthe response when the contact has none.",
          "type": "array",
          "items": {
            "format": "uuid",
            "type": "string",
            "example": "00000000-0000-0000-0000-000000000000"
          }
        },
        "CustomFields": {
          "description": "Custom field values for the contact. Only present when the request opted in via\r\nincludeCustomFields=true; empty when the company has no custom fields subscription,\r\nno definitions, or no values set on this contact. Only fields with a value are returned.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomFieldEntry"
          }
        },
        "Tags": {
          "description": "Names of the active tags assigned to the contact. Only present when the request opted in\r\nvia includeTags=true; empty when the contact carries no tags. Tags are shared across the\r\ncompany's billing group, so a tag assigned by a sibling company is included.\r\n            \r\nNames are normalised on save - lowercased with spaces removed - so a tag entered as\r\n\"Fire Safety\" comes back as \"firesafety\". Some older tags predate that, so compare\r\ncase-insensitively rather than assuming lower case.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "CompanyMap": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Unique customer identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "IsActive": {
          "description": "Is the customer map active",
          "type": "boolean"
        }
      }
    },
    "PhoneNumber": {
      "type": "object",
      "properties": {
        "Number": {
          "type": "string"
        },
        "AreaCode": {
          "type": "string"
        },
        "CountryCode": {
          "type": "string"
        }
      }
    },
    "Address": {
      "type": "object",
      "properties": {
        "StreetAddress": {
          "type": "string"
        },
        "Suburb": {
          "type": "string"
        },
        "TownCity": {
          "type": "string"
        },
        "Region": {
          "type": "string"
        },
        "PostCode": {
          "type": "string"
        },
        "CountryCode": {
          "type": "string"
        },
        "CountryName": {
          "type": "string"
        }
      }
    },
    "ResponseBankAccount": {
      "type": "object",
      "properties": {
        "DisplayName": {
          "description": "Display name of the bank account, as it appears to the user.",
          "type": "string"
        },
        "AccountNumber": {
          "description": "Account number as a single string, in the company-country format it was stored in.",
          "type": "string"
        },
        "IsDefault": {
          "description": "Whether this is the contact's default bank account.",
          "type": "boolean"
        }
      }
    },
    "CreateContactRequest": {
      "type": "object",
      "properties": {
        "CompanyId": {
          "format": "uuid",
          "description": "The unique identifier of the company cannot be used in conjunction with CompanyIds",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "CompanyIds": {
          "description": "A list of mapped unique company identifiers of the contact cannot be used in conjunction with CompanyId",
          "type": "array",
          "items": {
            "format": "uuid",
            "type": "string",
            "example": "00000000-0000-0000-0000-000000000000"
          }
        },
        "DisplayName": {
          "description": "Contact display name",
          "type": "string"
        },
        "CorrespondenceName": {
          "description": "Optional: Correspondence Name - defaults to Display Name if not set.",
          "type": "string"
        },
        "FirstName": {
          "description": "Contact's first name",
          "type": "string"
        },
        "LastName": {
          "description": "Contact's last name",
          "type": "string"
        },
        "EmailAddress": {
          "description": "Contact's email address",
          "type": "string"
        },
        "Category": {
          "description": "Contact's category",
          "enum": [
            "Contact",
            "Company",
            "Owner",
            "Bond Authority",
            "Owner Group",
            "Creditor",
            "Preferred Supplier",
            "Current Tenants"
          ],
          "type": "string"
        },
        "FaxPhone": {
          "$ref": "#/definitions/PhoneNumber",
          "description": "Contact's fax number"
        },
        "MobilePhone": {
          "$ref": "#/definitions/PhoneNumber",
          "description": "Contact's mobile phone number"
        },
        "DirectDialPhone": {
          "$ref": "#/definitions/PhoneNumber",
          "description": "Contact's direct dial phone number"
        },
        "TelephoneNumber": {
          "$ref": "#/definitions/PhoneNumber",
          "description": "Contact's Telephone number"
        },
        "PhysicalAddress": {
          "$ref": "#/definitions/Address",
          "description": "Contact's Physical address"
        },
        "PostalAddress": {
          "$ref": "#/definitions/Address",
          "description": "Contact's Postal address"
        },
        "TaxBusinessNumber": {
          "description": "Contact's Tax Business Number",
          "type": "string"
        },
        "TaxNumber": {
          "description": "Contact's Tax Number",
          "type": "string"
        },
        "PaymentMethod": {
          "description": "Payment method used to pay the contact.\r\n<br /><br />\r\nAccepted values (case-insensitive): EFT, CHQ, BPAY, CC, ACH, BacsDD, BECSDD, PAD, CashApp, NZBECSDD, None.\r\n<br /><br />\r\nSome methods are country-restricted: BPAY and BECSDD are Australia-only; BacsDD is United Kingdom / Guernsey; ACH and CashApp are United States; PAD is Canada; NZBECSDD is New Zealand.\r\n<br /><br />\r\nRequired for both Owner and Creditor contacts on Trust Accounting companies. When EFT is selected for a Creditor on a Trust Accounting company, a bank account must also be supplied via BankAccounts.",
          "type": "string"
        },
        "BankAccounts": {
          "description": "Bank accounts to pay the contact into.\r\n<br /><br />\r\nRequired for Creditor contacts on Trust Accounting companies when PaymentMethod is EFT. Optional for all other Creditor scenarios. Creditors may have at most one bank account; Owners may have multiple.\r\n<br /><br />\r\nExactly one bank account must be marked as default via IsDefault = true. If no entry is flagged, the first item in the list is treated as the default.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/BankAccount"
          }
        },
        "OwnerDisbursementAccount": {
          "description": "Disbursement account used to pay an Owner. Supply the account Code as returned by GET /api/accounts (e.g. \"1000\").\r\n<br /><br />\r\nRequired for Owner contacts on Trust Accounting companies. The referenced account must already exist in the company's Chart of Accounts and must use a 0% tax rate. The account is not created by this endpoint — only linked.",
          "type": "string"
        },
        "DisbursementProfileIds": {
          "description": "Disbursement profile identifiers to assign to an Owner. At least one profile is required for Owner contacts on Trust Accounting companies.\r\n<br /><br />\r\nEach identifier is a Guid scoped to a single company. Discover the available profiles via GET /api/disbursement-profiles?companyId={companyId}. Identifiers that don't belong to the contact's company are rejected with a validation error.",
          "type": "array",
          "items": {
            "format": "uuid",
            "type": "string",
            "example": "00000000-0000-0000-0000-000000000000"
          }
        },
        "CustomFields": {
          "description": "Optional custom field values to set on the new contact. Each entry identifies the field by its\r\nFieldIdentifier (as returned by GET with includeCustomFields=true) and supplies a value typed per\r\nthe field's definition; dropdowns are written by option label.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomFieldWriteEntry"
          }
        },
        "Tags": {
          "description": "Optional. The complete set of tag names for the contact. Leave it out or send null to leave the tags\r\nunchanged, so a new contact has none; send an empty list to remove them all.\r\n<br /><br />\r\nNames are cleaned the way the app cleans them: trimmed, spaces and &lt; &gt; removed, and lowercased. A name\r\ncan be at most 100 characters once cleaned. At most 100 names per request.\r\n<br /><br />\r\nA name with no active match in your billing group creates a tag. That needs the user's role to allow\r\n\"Can create, rename and archive tags\"; without it the request is rejected with 400 and nothing is saved.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "BankAccount": {
      "type": "object",
      "properties": {
        "DisplayName": {
          "description": "Display name of the bank account, as it appears to the user (e.g. \"Acme Plumbing Operating Account\").",
          "type": "string"
        },
        "AccountNumber": {
          "description": "Account number as a single string. The expected format depends on the company's country:\r\n<br /><br />\r\n• <b>Australia</b>: 6-digit BSB followed by the account number (e.g. 062-001 12345678). Hyphens and spaces are accepted and stripped during validation.<br />\r\n• <b>New Zealand</b>: bank-branch-account-suffix in the canonical 2-4-7-2 or 2-4-7-3 form (e.g. 12-3456-7890123-00).<br />\r\n• <b>United Kingdom</b>: 6-digit sort code followed by the account number (e.g. 20-00-00 12345678).<br />\r\n• <b>United States</b>: 9-digit ABA routing number followed by the account number.<br />\r\n• <b>Canada</b>: 5-digit transit number, 3-digit financial institution number, then the account number.<br /><br />\r\nThe company's country is determined by its postal address, not the contact's country. Invalid formats return a validation error.",
          "type": "string"
        },
        "IsDefault": {
          "description": "Marks this account as the default account for the contact. Exactly one account in BankAccounts must be the default. If no entry is flagged, the first item in the list is treated as the default.",
          "type": "boolean"
        }
      }
    },
    "UpdateContactRequest": {
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique contact identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "CompanyMaps": {
          "description": "Unique contact identifier",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CompanyMap"
          }
        },
        "DisplayName": {
          "description": "Contact display name",
          "type": "string"
        },
        "CorrespondenceName": {
          "description": "Optional: Correspondence Name - defaults to Display Name if not set.",
          "type": "string"
        },
        "FirstName": {
          "description": "Contact's first name",
          "type": "string"
        },
        "LastName": {
          "description": "Contact's last name",
          "type": "string"
        },
        "EmailAddress": {
          "description": "Contact's email address",
          "type": "string"
        },
        "Category": {
          "description": "Contact's category",
          "type": "string"
        },
        "FaxPhone": {
          "$ref": "#/definitions/PhoneNumber",
          "description": "Contact's fax number"
        },
        "MobilePhone": {
          "$ref": "#/definitions/PhoneNumber",
          "description": "Contact's mobile phone number"
        },
        "DirectDialPhone": {
          "$ref": "#/definitions/PhoneNumber",
          "description": "Contact's direct dial phone number"
        },
        "TelephoneNumber": {
          "$ref": "#/definitions/PhoneNumber",
          "description": "Contact's Telephone number"
        },
        "PhysicalAddress": {
          "$ref": "#/definitions/Address",
          "description": "Contact's Physical address"
        },
        "PostalAddress": {
          "$ref": "#/definitions/Address",
          "description": "Contact's Postal address"
        },
        "TaxBusinessNumber": {
          "description": "Contact's Tax Business Number",
          "type": "string"
        },
        "TaxNumber": {
          "description": "Contact's Tax Number",
          "type": "string"
        },
        "PaymentMethod": {
          "description": "Payment method used to pay the contact.\r\n<br /><br />\r\nAccepted values (case-insensitive): EFT, CHQ, BPAY, CC, ACH, BacsDD, BECSDD, PAD, CashApp, NZBECSDD, None.\r\n<br /><br />\r\nSome methods are country-restricted: BPAY and BECSDD are Australia-only; BacsDD is United Kingdom / Guernsey; ACH and CashApp are United States; PAD is Canada; NZBECSDD is New Zealand.\r\n<br /><br />\r\nRequired for both Owner and Creditor contacts on Trust Accounting companies. Omit (or send null / empty) to leave the existing payment method unchanged.",
          "type": "string"
        },
        "BankAccounts": {
          "description": "Bank accounts to pay the contact into.\r\n<br /><br />\r\nOmit (or send null) to leave the contact's existing bank accounts unchanged. Send an empty array to remove all of them.\r\nA supplied list replaces the contact's current accounts. Creditors may have at most one bank account; Owners may have multiple.\r\n<br /><br />\r\nExactly one bank account must be marked as default via IsDefault = true. If no entry is flagged, the first item in the list is treated as the default.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/BankAccount"
          }
        },
        "OwnerDisbursementAccount": {
          "description": "Disbursement account used to pay an Owner. Supply the account Code as returned by GET /api/accounts (e.g. \"1000\").\r\n<br /><br />\r\nRequired for Owner contacts on Trust Accounting companies. Omit (or send null / empty) to leave the existing disbursement account unchanged. The referenced account must already exist in the company's Chart of Accounts and use a 0% tax rate; it is not created by this endpoint — only linked.",
          "type": "string"
        },
        "DisbursementProfileIds": {
          "description": "Disbursement profile identifiers to assign to an Owner.\r\n<br /><br />\r\nEach identifier is a Guid scoped to a single company. Discover the available profiles via GET /api/disbursement-profiles?companyId={companyId}. Identifiers that don't belong to the contact's company are rejected with a validation error.\r\n<br /><br />\r\nOmit (or send null) to leave the contact's existing disbursement profiles unchanged. Send an empty array to remove all of them.",
          "type": "array",
          "items": {
            "format": "uuid",
            "type": "string",
            "example": "00000000-0000-0000-0000-000000000000"
          }
        },
        "CustomFields": {
          "description": "Optional custom field values to set. Omitting CustomFields (or sending an empty array) leaves all\r\ncustom fields unchanged; a listed field with a null / empty value clears it. Dropdowns are written\r\nby option label.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomFieldWriteEntry"
          }
        },
        "Tags": {
          "description": "Optional. The complete set of tag names for the contact, replacing the tags it has. Leave it out or send\r\nnull to leave the tags unchanged; send an empty list to remove them all.\r\n<br /><br />\r\nNames are cleaned the way the app cleans them: trimmed, spaces and &lt; &gt; removed, and lowercased. A name\r\ncan be at most 100 characters once cleaned. At most 100 names per request.\r\n<br /><br />\r\nA name with no active match in your billing group creates a tag. That needs the user's role to allow\r\n\"Can create, rename and archive tags\"; without it the request is rejected with 400 and nothing is saved.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "example": {
        "GlobalIdentifier": "e1dd2bd2-e6d4-45ec-94e7-4772c11a36fc",
        "CompanyMaps": [
          {
            "Id": "5e861e73-2998-4437-99fa-1527c155886d",
            "IsActive": true
          }
        ],
        "DisplayName": "Example Owner",
        "CorrespondenceName": "Example Correspondence Name",
        "FirstName": "Example",
        "LastName": "Owner",
        "EmailAddress": "mail@sample.com",
        "Category": "Owner",
        "FaxPhone": {
          "Number": "2365555",
          "AreaCode": "111",
          "CountryCode": "222"
        },
        "MobilePhone": {
          "Number": "2365555",
          "AreaCode": "111",
          "CountryCode": "222"
        },
        "DirectDialPhone": {
          "Number": "2365555",
          "AreaCode": "111",
          "CountryCode": "222"
        },
        "TelephoneNumber": {
          "Number": "2365555",
          "AreaCode": "111",
          "CountryCode": "222"
        },
        "PhysicalAddress": {
          "StreetAddress": "123 Main Street",
          "Suburb": "Sydney",
          "TownCity": "Sydney",
          "Region": "NSW",
          "PostCode": "7005",
          "CountryCode": "PA"
        },
        "PostalAddress": {
          "StreetAddress": "123 Main Street",
          "Suburb": "Sydney",
          "TownCity": "Sydney",
          "Region": "NSW",
          "PostCode": "7005",
          "CountryCode": "PA"
        },
        "TaxBusinessNumber": "123456789",
        "TaxNumber": "123456789",
        "PaymentMethod": "EFT",
        "BankAccounts": [
          {
            "DisplayName": "Owner Operating Account",
            "AccountNumber": "12-3456-7890123-00",
            "IsDefault": true
          }
        ],
        "OwnerDisbursementAccount": "1000",
        "DisbursementProfileIds": [
          "8e2080c1-70ac-49a0-86e1-275801804623"
        ],
        "Tags": [
          "commercial",
          "priority"
        ]
      }
    },
    "Result": {
      "description": "Result of the request",
      "required": [
        "Success"
      ],
      "type": "object",
      "properties": {
        "Success": {
          "description": "Boolean that describes if the request has been successful or failed",
          "type": "boolean"
        },
        "Message": {
          "description": "A message to notify the issue encountered",
          "type": "string"
        },
        "Messages": {
          "description": "A list of messages to notify the issue encountered",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "CreditNotesResponseModel": {
      "type": "object",
      "properties": {
        "Data": {
          "description": "Response envelope",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CreditNotes"
          }
        },
        "MetaData": {
          "$ref": "#/definitions/MetaData",
          "description": "Meta data of the result"
        }
      }
    },
    "CreditNotes": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Credit note id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "DisplayId": {
          "description": "The credit note number as shown on the Web UI",
          "type": "string"
        },
        "Contact": {
          "$ref": "#/definitions/CreditNoteContactModel",
          "description": "Contact associated with credit note"
        },
        "Date": {
          "format": "date-time",
          "description": "Credit note creation date",
          "type": "string"
        },
        "Status": {
          "description": "Credit note status",
          "type": "string"
        },
        "LineAmountTypes": {
          "description": "LineAmountType of credit note",
          "type": "string"
        },
        "SubTotal": {
          "format": "double",
          "description": "Credit note total excluding tax if any",
          "type": "number"
        },
        "TotalTax": {
          "format": "double",
          "description": "Total tax",
          "type": "number"
        },
        "Total": {
          "format": "double",
          "description": "Credit note total including tax if any",
          "type": "number"
        },
        "Reference": {
          "description": "Reference of credit note",
          "type": "string"
        },
        "RemainingCredit": {
          "format": "double",
          "description": "Remaining credit available after allocations",
          "type": "number"
        },
        "Type": {
          "description": "Type of credit",
          "type": "string"
        },
        "Property": {
          "$ref": "#/definitions/Property",
          "description": "Property information if available"
        },
        "LineItems": {
          "description": "List of line items of credit note",
          "type": "array",
          "items": {
            "$ref": "#/definitions/LineItem"
          }
        },
        "Allocations": {
          "description": "List of allocations of credit note",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Allocation"
          }
        },
        "UpdatedDate": {
          "format": "date-time",
          "description": "The date and time (UTC) the entity was last updated",
          "type": "string"
        }
      }
    },
    "CreditNoteContactModel": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Contact id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "Full name of contact",
          "type": "string"
        }
      }
    },
    "Property": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Property Id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "description": "Property title",
          "type": "string"
        },
        "Tenancy": {
          "$ref": "#/definitions/Tenancy",
          "description": "Current tenancy associated with the property"
        }
      }
    },
    "LineItem": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Line item id of credit note",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Description": {
          "description": "Description of line item",
          "type": "string"
        },
        "Quantity": {
          "format": "double",
          "description": "Quantity of item",
          "type": "number"
        },
        "UnitAmount": {
          "format": "double",
          "description": "Unit amount of the item",
          "type": "number"
        },
        "TaxAmount": {
          "format": "double",
          "description": "Tax amount of the line item",
          "type": "number"
        },
        "TaxType": {
          "description": "Tax type of line item",
          "type": "string"
        },
        "AccountCode": {
          "description": "Account code of the line item",
          "type": "string"
        },
        "Tracking": {
          "description": "Tracking categories assigned to this line item (e.g. cost centre). Empty when no tracking is set.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/LineItemTracking"
          }
        }
      }
    },
    "Allocation": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Id of allocation of credit note",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Amount": {
          "format": "double",
          "description": "Amount allocated",
          "type": "number"
        },
        "Invoice": {
          "$ref": "#/definitions/CompactInvoice",
          "description": "Invoice the credit note has been allocated to"
        }
      }
    },
    "Tenancy": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Tenancy Id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "description": "Tenancy title",
          "type": "string"
        }
      }
    },
    "LineItemTracking": {
      "type": "object",
      "properties": {
        "Category": {
          "description": "The tracking category name",
          "type": "string"
        },
        "Option": {
          "description": "The selected tracking option name within the category",
          "type": "string"
        }
      }
    },
    "CompactInvoice": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "The id of the invoice",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "DisplayId": {
          "description": "The invoice number as shown on the Web UI",
          "type": "string"
        },
        "Status": {
          "description": "Invoice status. Returned in UPPERCASE. UI labels: DRAFT=Draft, SUBMITTED=Awaiting Approval, AUTHORISED=Approved, VOIDED=Voided, DELETED=Deleted, PAID=Paid.\r\n\"Overdue\"/\"Due Today\"/\"Part Paid\" are UI-only states derived from an AUTHORISED invoice; all return here as AUTHORISED.",
          "enum": [
            "None",
            "DRAFT",
            "AUTHORISED",
            "VOIDED",
            "SUBMITTED",
            "DELETED",
            "PAID"
          ],
          "type": "string"
        },
        "AmountDue": {
          "format": "double",
          "description": "The due amount of the invoice",
          "type": "number"
        },
        "Total": {
          "format": "double",
          "description": "Total of Invoice tax inclusive (i.e. SubTotal + TotalTax)",
          "type": "number"
        }
      }
    },
    "CreateCreditNoteRequest": {
      "required": [
        "CompanyId",
        "ContactId",
        "Type",
        "IssueDate",
        "LineItems"
      ],
      "type": "object",
      "properties": {
        "CompanyId": {
          "format": "uuid",
          "description": "Unique identifier of the company",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "ContactId": {
          "format": "uuid",
          "description": "Unique identifier of customer's contact",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Reference": {
          "description": "Reference of the credit note",
          "type": "string"
        },
        "Type": {
          "description": "Type of credit note",
          "enum": [
            "None",
            "ACCPAYCREDIT",
            "ACCRECCREDIT"
          ],
          "type": "string"
        },
        "IssueDate": {
          "format": "date-time",
          "description": "Issue date of credit note",
          "type": "string"
        },
        "TotalTax": {
          "format": "double",
          "description": "Total tax of credit note",
          "type": "number"
        },
        "SubTotal": {
          "format": "double",
          "description": "Sub total of credit note",
          "type": "number"
        },
        "Total": {
          "format": "double",
          "description": "Total of credit note",
          "type": "number"
        },
        "Status": {
          "description": "Status of credit note",
          "enum": [
            "Draft",
            "Authorised"
          ],
          "type": "string"
        },
        "PropertyId": {
          "format": "uuid",
          "description": "Property id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "TenancyId": {
          "format": "uuid",
          "description": "Tenant id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "LineAmountTypes": {
          "description": "Type of credit note line amount",
          "enum": [
            "NoTax",
            "Inclusive",
            "Exclusive"
          ],
          "type": "string"
        },
        "LineItems": {
          "description": "Attached credit note line items",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CreditNoteLineItemModel"
          }
        }
      },
      "example": {
        "CompanyId": "ed51630a-0f7c-4466-8b3f-29c9608852f9",
        "ContactId": "79ecd4c0-f72b-4322-b513-2a525685d773",
        "Reference": "Create credit note",
        "Type": "ACCPAYCREDIT",
        "IssueDate": "2026-11-15T11:56:47.1951068Z",
        "TotalTax": 0.0,
        "SubTotal": 1000.0,
        "Total": 1000.0,
        "Status": "Authorised",
        "PropertyId": "de0bc112-2413-4311-959e-ed0244aa29e9",
        "TenancyId": "28ec1229-c0e8-46a9-863b-77a55842f974",
        "LineAmountTypes": "Exclusive",
        "LineItems": [
          {
            "Description": "Test",
            "Quantity": 1,
            "UnitAmount": 1000.0,
            "TaxAmount": 0.0,
            "TaxType": "NONE",
            "AccountCode": "0001"
          }
        ]
      }
    },
    "CreditNoteLineItemModel": {
      "required": [
        "Description",
        "Quantity",
        "UnitAmount",
        "TaxAmount",
        "TaxType",
        "AccountCode"
      ],
      "type": "object",
      "properties": {
        "Description": {
          "description": "Description of line item",
          "type": "string"
        },
        "Quantity": {
          "format": "int32",
          "description": "Quantity per line item",
          "type": "integer"
        },
        "UnitAmount": {
          "format": "double",
          "description": "Amount per unit for the line item",
          "type": "number"
        },
        "TaxAmount": {
          "format": "double",
          "description": "Tax per unit for the line item",
          "type": "number"
        },
        "TaxType": {
          "description": "Tax type code. Can use https://api.re-leased.com/api/taxtypes/{companyId} to get the tax types",
          "type": "string"
        },
        "AccountCode": {
          "description": "Account code. Can use https://api.re-leased.com/api/accounts to get the account codes",
          "type": "string"
        }
      }
    },
    "CreditNoteModel": {
      "type": "object",
      "properties": {
        "Data": {
          "$ref": "#/definitions/CreditNotes",
          "description": "Response envelope"
        }
      }
    },
    "UpdateCreditNoteRequest": {
      "required": [
        "Id"
      ],
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "The id of the credit note",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "ContactId": {
          "format": "uuid",
          "description": "The unique identifier of customer's contact",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "IssueDate": {
          "format": "date-time",
          "description": "Issue date of credit note",
          "type": "string"
        },
        "Status": {
          "description": "The status of the credit note",
          "enum": [
            "Authorised",
            "Voided",
            "Deleted"
          ],
          "type": "string"
        },
        "LineAmountTypes": {
          "description": "The type of credit note line amount",
          "enum": [
            "NoTax",
            "Inclusive",
            "Exclusive"
          ],
          "type": "string"
        },
        "LineItems": {
          "description": "Attached credit note line items",
          "type": "array",
          "items": {
            "$ref": "#/definitions/UpdateCreditNoteLineItemRequest"
          }
        },
        "PropertyId": {
          "format": "uuid",
          "description": "Related property id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "TenancyId": {
          "format": "uuid",
          "description": "Related tenant id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Reference": {
          "description": "Reference of credit note",
          "type": "string"
        }
      },
      "example": {
        "Id": "e9a4a75f-2dd4-429c-8335-8789978b3748",
        "IssueDate": "2026-11-15T11:56:47.1951068Z",
        "Status": 2,
        "LineItems": [
          {
            "Id": "55a01455-5a79-40b4-8b58-8d3c9e346adb",
            "Description": "Update",
            "Quantity": 10.0,
            "UnitAmount": 200.0,
            "TaxType": "NONE",
            "AccountCode": "2000"
          },
          {
            "Id": "00000000-0000-0000-0000-000000000000",
            "Description": "New",
            "Quantity": 1.0,
            "UnitAmount": 1000.0,
            "TaxType": "10%GST",
            "AccountCode": "1000"
          }
        ],
        "PropertyId": "eaae4c02-3dcf-46d5-8a64-fb990d4a2943",
        "TenancyId": "f8d69c3c-45a9-4bf9-bbac-68cff6a678df",
        "Reference": "Updated from Public Api"
      }
    },
    "UpdateCreditNoteLineItemRequest": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Line item Id. If not supplied will be treated as a new line item",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Description": {
          "description": "Description of line item",
          "type": "string"
        },
        "Quantity": {
          "format": "double",
          "description": "Quantity per line item",
          "type": "number"
        },
        "UnitAmount": {
          "format": "double",
          "description": "Per unit amount",
          "type": "number"
        },
        "TaxType": {
          "description": "Tax type code. Can use https://api.re-leased.com/api/taxtypes/{companyId} to get the tax types",
          "type": "string"
        },
        "AccountCode": {
          "description": "Account code. Can use https://api.re-leased.com/api/accounts to get the account codes",
          "type": "string"
        }
      }
    },
    "CreditNoteResponseModel": {
      "type": "object",
      "properties": {
        "Data": {
          "$ref": "#/definitions/CreditNotes",
          "readOnly": true
        }
      }
    },
    "AllocateCreditNoteRequest": {
      "type": "object",
      "properties": {
        "Allocations": {
          "description": "List of credit note allocations",
          "type": "array",
          "items": {
            "$ref": "#/definitions/AllocateInvoice"
          }
        }
      },
      "example": {
        "Allocations": [
          {
            "InvoiceId": "e7f03590-2a4b-493e-b09b-6bbcef53d9ec",
            "Amount": 1000.0,
            "AllocationDate": "11/15/2026 11:56:47 AM"
          }
        ]
      }
    },
    "AllocateInvoice": {
      "type": "object",
      "properties": {
        "InvoiceId": {
          "description": "Invoice id for allocation",
          "type": "string"
        },
        "Amount": {
          "format": "double",
          "description": "Amount to allocate",
          "type": "number"
        },
        "AllocationDate": {
          "description": "Date of allocation",
          "type": "string"
        }
      }
    },
    "UnAllocateCreditNoteRequest": {
      "type": "object",
      "properties": {
        "AllocationIds": {
          "description": "List of invoice ids to unallocate",
          "type": "array",
          "items": {
            "format": "uuid",
            "type": "string",
            "example": "00000000-0000-0000-0000-000000000000"
          }
        }
      },
      "example": {
        "AllocationIds": [
          "a0d661df-10d5-4021-ac09-2c10839fc2ea",
          "8d7319d5-a364-480d-a53c-515ae6e83a13"
        ]
      }
    },
    "DisbursementProfileResponseModel": {
      "type": "object",
      "properties": {
        "Data": {
          "description": "Response envelope",
          "type": "array",
          "items": {
            "$ref": "#/definitions/DisbursementProfile"
          }
        }
      }
    },
    "DisbursementProfile": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Disbursement profile identifier, used as DisbursementProfileIds in the create contact request.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "Name of the disbursement profile as configured in Re-Leased.",
          "type": "string"
        }
      }
    },
    "InspectionDataModel": {
      "description": "Inspection data model",
      "required": [
        "Inspections"
      ],
      "type": "object",
      "properties": {
        "Inspections": {
          "description": "List of inspections",
          "type": "array",
          "items": {
            "$ref": "#/definitions/InspectionData"
          }
        }
      }
    },
    "InspectionData": {
      "required": [
        "UserTimeZone",
        "FromDateUtc",
        "FromDateLocal",
        "ToDateUtc",
        "ToDateLocal",
        "Type",
        "IsComplete",
        "Property"
      ],
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique inspection identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "UserTimeZone": {
          "description": "Time zone of the authorized user",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "FromDateUtc": {
          "format": "date-time",
          "description": "Inspection start date UTC timestamp",
          "type": "string"
        },
        "FromDateLocal": {
          "format": "date-time",
          "description": "Inspection start date in the authorized users local time zone",
          "type": "string"
        },
        "ToDateUtc": {
          "format": "date-time",
          "description": "Inspection end date UTC timestamp",
          "type": "string"
        },
        "ToDateLocal": {
          "format": "date-time",
          "description": "Inspection end date in the authorized users local time zone",
          "type": "string"
        },
        "Type": {
          "description": "Name of the inspection type",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "Category": {
          "description": "Name of the inspection category",
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "IsComplete": {
          "description": "Boolean that describes whether the inspection is complete or incomplete",
          "type": "boolean"
        },
        "Description": {
          "description": "Description provided for the inspection",
          "maxLength": 1500,
          "minLength": 0,
          "type": "string"
        },
        "Notes": {
          "description": "Notes provided for the inspection",
          "maxLength": 1500,
          "minLength": 0,
          "type": "string"
        },
        "Property": {
          "$ref": "#/definitions/PropertyData",
          "description": "The related property data for the inspection"
        },
        "Tenancy": {
          "$ref": "#/definitions/TenancyData",
          "description": "The related tenancy data for the inspection"
        },
        "AreaId": {
          "format": "int32",
          "description": "AreaId for the Inspection",
          "type": "integer"
        },
        "DelegatedUserGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique Delegated User identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Frequency": {
          "format": "int32",
          "description": "The frequency of the inspection",
          "type": "integer"
        },
        "FrequencyType": {
          "description": "The type of frequency of the inspection",
          "type": "string"
        },
        "DelegatedUserEmail": {
          "description": "Delegated user email",
          "type": "string"
        },
        "Url": {
          "description": "Url for a Re-Leased user to access the inspection.",
          "type": "string"
        },
        "Tags": {
          "description": "Names of the active tags assigned to the inspection. Only present when the request opted\r\nin via includeTags=true. The product offers no tag picker for inspections, so in practice\r\nthis is an empty array.\r\n            \r\nNames are normalised on save - lowercased with spaces removed - so a tag entered as\r\n\"Fire Safety\" comes back as \"firesafety\". Some older tags predate that, so compare\r\ncase-insensitively rather than assuming lower case.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "PropertyData": {
      "required": [
        "Company",
        "GlobalIdentifier",
        "Name",
        "ManagerGlobalIdentifier",
        "ManagerFirstName",
        "ManagerLastName",
        "ManagerEmail",
        "Type",
        "ImageUrl"
      ],
      "type": "object",
      "properties": {
        "Company": {
          "$ref": "#/definitions/CompanyData",
          "description": "Company data"
        },
        "PropertyKeys": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PropertyKey"
          }
        },
        "Areas": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PropertyAreas"
          }
        },
        "RatingValuations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RatingValuationDetails"
          }
        },
        "EpcRating": {
          "type": "string"
        },
        "PropertyGroup": {
          "$ref": "#/definitions/PropertyGroupInfo",
          "description": "The property group this property belongs to, or null if not in a group"
        },
        "IsCommonProperty": {
          "description": "Indicates whether this property is the common property for a property group",
          "type": "boolean"
        },
        "CustomFields": {
          "description": "Custom field values for the property. Only present when the request opted in via\r\nincludeCustomFields=true; empty when the company has no custom fields subscription,\r\nno definitions, or no values set on this property. Only fields with a value are returned.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomFieldEntry"
          }
        },
        "Tags": {
          "description": "Names of the active tags assigned to the property. Only present when the request opted in\r\nvia includeTags=true; empty when the property carries no tags. Tags are shared across the\r\ncompany's billing group, so a tag assigned by a sibling company is included.\r\n            \r\nNames are normalised on save - lowercased with spaces removed - so a tag entered as\r\n\"Fire Safety\" comes back as \"firesafety\". Some older tags predate that, so compare\r\ncase-insensitively rather than assuming lower case.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique property identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "UpdatedDate": {
          "format": "date-time",
          "description": "The date and time (UTC) the property was last updated",
          "type": "string"
        },
        "IsArchived": {
          "description": "Flag indicating if the property is archived",
          "type": "boolean"
        },
        "Status": {
          "description": "Lifecycle status of the property. One of: \"Draft\", \"Active\", \"Archived\".",
          "type": "string"
        },
        "CountryIsoCode": {
          "description": "ISO 3166-1 alpha-2 country code (e.g. \"NZ\", \"AU\", \"GB\"), or null if no country set.",
          "type": "string"
        },
        "VatElectedType": {
          "format": "int32",
          "description": "VAT election option (UK only). Raw enum value: 0 = Vat, 1 = NonVat. Null when not set.",
          "type": "integer"
        },
        "VatEffectiveDate": {
          "format": "date-time",
          "description": "Effective date for the VAT election (UK only). Null when not set.",
          "type": "string"
        },
        "Manager": {
          "$ref": "#/definitions/ManagerDetails",
          "description": "Property manager details. Server-populated on responses; not settable via the public CREATE endpoint\r\n(the authenticated caller is set as the property manager automatically)."
        },
        "UsageType": {
          "description": "Usage type of the property. One of: \"Residential\", \"Commercial\", \"Mixed\", \"Agricultural\".",
          "maxLength": 12,
          "minLength": 0,
          "type": "string"
        },
        "CustomReference": {
          "description": "Custom Reference of the property",
          "maxLength": 150,
          "minLength": 0,
          "type": "string"
        },
        "Name": {
          "description": "Name of the property",
          "maxLength": 150,
          "minLength": 0,
          "type": "string"
        },
        "ManagerGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique property manager identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "ManagerFirstName": {
          "description": "First name of the property manager",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "ManagerLastName": {
          "description": "Last name of the property manager",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "ManagerEmail": {
          "description": "Email address of the property manager",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "ManagerPhoneNumber": {
          "description": "Phone number of the property manager",
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "ManagerMobilePhoneNumber": {
          "description": "Mobile number of the property manager",
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "Address": {
          "description": "Full address of the property, comma separated",
          "maxLength": 1140,
          "minLength": 0,
          "type": "string"
        },
        "Type": {
          "description": "Name of the property type",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "Longitude": {
          "description": "Longitude position of the property",
          "maxLength": 20,
          "minLength": 0,
          "type": "string"
        },
        "Latitude": {
          "description": "Latitude position of the property",
          "maxLength": 20,
          "minLength": 0,
          "type": "string"
        },
        "ImageUrl": {
          "description": "The URL for the property image",
          "type": "string"
        },
        "OwnerGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique owner identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "OwnerName": {
          "description": "Name of the owner",
          "maxLength": 500,
          "minLength": 0,
          "type": "string"
        },
        "OwnerFirstName": {
          "description": "FirstName of the owner",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "OwnerLastName": {
          "description": "LastName of the owner",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "OwnerEmail": {
          "description": "Email address of the owner",
          "maxLength": 500,
          "minLength": 0,
          "type": "string"
        },
        "OwnerPhoneNumber": {
          "description": "Phone number of the owner",
          "maxLength": 80,
          "minLength": 0,
          "type": "string"
        },
        "OwnerMobilePhoneNumber": {
          "description": "Mobile number of the owner",
          "maxLength": 80,
          "minLength": 0,
          "type": "string"
        },
        "FlatNumber": {
          "description": "Flat Number of the property",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "StreetNumber": {
          "description": "Street of the property",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "Street": {
          "description": "Street of the property",
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        },
        "Suburb": {
          "description": "Suburb of the property",
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        },
        "TownCity": {
          "description": "Town/City of the property",
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        },
        "StateRegion": {
          "description": "State/Region of the property",
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        },
        "PostZipCode": {
          "description": "Post/Zip code of the property",
          "maxLength": 20,
          "minLength": 0,
          "type": "string"
        },
        "Country": {
          "description": "Name of the property country",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "DateOfPurchase": {
          "format": "date-time",
          "description": "The purchase date of the property",
          "type": "string"
        },
        "PurchasePrice": {
          "format": "double",
          "description": "The purchase price of the property",
          "type": "number"
        },
        "LandArea": {
          "format": "double",
          "description": "The land area of the property",
          "type": "number"
        },
        "FloorArea": {
          "format": "double",
          "description": "The floor area of the property",
          "type": "number"
        },
        "NumberOfBedrooms": {
          "format": "int32",
          "description": "Number of bedrooms for the property",
          "type": "integer"
        },
        "NumberOfBathrooms": {
          "format": "double",
          "description": "Number of bathrooms for the property",
          "type": "number"
        },
        "AllowsPets": {
          "description": "Flag indicating if the property allows pets",
          "type": "boolean"
        },
        "AllowsSmoking": {
          "description": "Flag indicating if the property allows smoking",
          "type": "boolean"
        },
        "AllowsUnattendedInspections": {
          "description": "Flag indicating if the property allows unattended inspections",
          "type": "boolean"
        },
        "IsFurnished": {
          "description": "Flag indicating if the property is furnished",
          "type": "boolean"
        }
      }
    },
    "TenancyData": {
      "description": "Tenancy data",
      "required": [
        "GlobalIdentifier",
        "PropertyGlobalIdentifier",
        "Name",
        "Tenants"
      ],
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique tenancy identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "PropertyGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique property identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "Name of the tenancy",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "StartDateUtc": {
          "format": "date-time",
          "description": "Tenancy start UTC timestamp",
          "type": "string"
        },
        "IsActive": {
          "description": "Active State of the tenancy",
          "type": "boolean"
        },
        "Status": {
          "description": "Tenancy lifecycle status: Draft, Active or Archived.",
          "type": "string"
        },
        "RentInclusive": {
          "description": "Indicates if the rent is all-inclusive.",
          "type": "boolean"
        },
        "LeaseType": {
          "$ref": "#/definitions/LeaseLookup",
          "description": "The tenancy/lease type (id + name). Null if not set."
        },
        "IndustryType": {
          "$ref": "#/definitions/LeaseLookup",
          "description": "The tenant industry / usage type (id + name). Null if not set."
        },
        "IsInsideTheLandlordAndTenantAct": {
          "description": "Indicates if the current term is inside the UK Landlord and Tenant Act.",
          "type": "boolean"
        },
        "EndDateUtc": {
          "format": "date-time",
          "description": "Tenancy end UTC timestamp",
          "type": "string"
        },
        "RentFrequencyLength": {
          "format": "int32",
          "description": "The Frequency length between the weeks, months or years, if the rent is setup with a custom payment frequency no value will be returned.",
          "type": "integer"
        },
        "RentFrequencyUnit": {
          "description": "The Frequency unit can be weeks, months or years, if the rent is setup with a custom payment frequency no value will be returned.",
          "type": "string"
        },
        "RentFrequencyAmount": {
          "format": "double",
          "description": "The rent amount (including opex) based on the Frequency Length and Frequency Unit, if the rent is setup with a custom payment frequency no value will be returned.",
          "type": "number"
        },
        "RentFrequencyAmountExcludingOpex": {
          "format": "double",
          "description": "The rent amount (excluding opex) based on the Frequency Length and Frequency Unit, if the rent is setup with a custom payment frequency no value will be returned.",
          "type": "number"
        },
        "AnnualRentAmount": {
          "format": "double",
          "description": "Annual net rent amount for the tenancy.",
          "type": "number"
        },
        "RentPaidToUtc": {
          "format": "date-time",
          "description": "UTC timestamp that shows where the rent if paid up to.",
          "type": "string"
        },
        "RentPartPayment": {
          "format": "double",
          "description": "Amount paid into the next period beyond the rent paid to date.",
          "type": "number"
        },
        "Tenants": {
          "description": "Collection of tenants, can be one or many.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TenantData"
          }
        },
        "Areas": {
          "description": "Collection of tenancy areas, can be one or many.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/LeaseArea"
          }
        },
        "Terms": {
          "description": "Collection of tenancy option terms, includes renewals. Empty array if no terms exist.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/LeaseTerm"
          }
        },
        "Breaks": {
          "description": "Collection of break clauses with their scheduled occurrences. Empty array if none exist.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/LeaseBreakDetails"
          }
        },
        "CurrentReview": {
          "$ref": "#/definitions/LeaseRentReview",
          "description": "The current/next pending rent review. Returns null if there is no pending review."
        },
        "Clause": {
          "description": "Tenancy schedule clause. Returns null for tenancies without a clause.",
          "type": "string"
        },
        "NoticeToVacate": {
          "$ref": "#/definitions/LeaseNoticeToVacate",
          "description": "Notice to vacate details. Returns null for tenancies without notice to vacate."
        },
        "UpdatedDate": {
          "format": "date-time",
          "description": "Update date of the tenant",
          "type": "string"
        },
        "CustomFields": {
          "description": "Custom field values for the tenancy. Only present when the request opted in via\r\nincludeCustomFields=true; empty when the company has no custom fields subscription,\r\nno definitions, or no values set on this tenancy. Only fields with a value are returned.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomFieldEntry"
          }
        },
        "Tags": {
          "description": "Names of the active tags assigned to the tenancy. Only present when the request opted in\r\nvia includeTags=true; empty when the tenancy carries no tags. Tags are shared across the\r\ncompany's billing group, so a tag assigned by a sibling company is included.\r\n            \r\nNames are normalised on save - lowercased with spaces removed - so a tag entered as\r\n\"Fire Safety\" comes back as \"firesafety\". Some older tags predate that, so compare\r\ncase-insensitively rather than assuming lower case.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "Notes": {
          "description": "The tenancy's free-text notes - the value written as Notes on create/update, and the same value\r\nas Clause (Notes is the name that matches the request field). Null when none are recorded. Notes recorded against the tenancy (including arrears notes) are returned by\r\nGET /api/tenancies/{id}/notes, which needs the notes scope.",
          "type": "string"
        },
        "ArrearsStatus": {
          "$ref": "#/definitions/LeaseLookup",
          "description": "The tenancy's arrears status (id + name), e.g. \"Payment Plan\", \"Invoice Dispute\" or \"Debt Collectors\".\r\nThe statuses are configured per company. Null when no arrears status is set."
        }
      }
    },
    "CompanyData": {
      "required": [
        "GlobalIdentifier",
        "Name"
      ],
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique company identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "Name of the company",
          "maxLength": 150,
          "minLength": 0,
          "type": "string"
        },
        "Address": {
          "description": "Full address of the company, comma separated",
          "maxLength": 1180,
          "minLength": 0,
          "type": "string"
        },
        "Street": {
          "description": "Street of the company",
          "maxLength": 500,
          "minLength": 0,
          "type": "string"
        },
        "TownCity": {
          "description": "Town/City of the company",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "StateRegion": {
          "description": "State/Region of the company",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "PostZipCode": {
          "description": "Post/Zip code of the company",
          "maxLength": 20,
          "minLength": 0,
          "type": "string"
        },
        "Country": {
          "description": "Name of the company country",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "LogoUrl": {
          "description": "The URL for the company logo image, due to the URL being volatile the logo should be stored locally and not linked to",
          "type": "string"
        }
      }
    },
    "PropertyKey": {
      "type": "object",
      "properties": {
        "Reference": {
          "description": "Property key reference",
          "maxLength": 150,
          "minLength": 0,
          "type": "string"
        },
        "Description": {
          "description": "Property key description",
          "maxLength": 500,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "PropertyAreas": {
      "type": "object",
      "properties": {
        "AreaId": {
          "format": "int32",
          "description": "Id of the area",
          "type": "integer"
        },
        "AreaTypeId": {
          "format": "int32",
          "description": "Associated Id for the type of the area",
          "type": "integer"
        },
        "AreaTypeName": {
          "description": "Title for the type of the area",
          "type": "string"
        },
        "AreaTitle": {
          "description": "Title of the area",
          "type": "string"
        },
        "AreaEpcRating": {
          "description": "EPC Rating of the area",
          "type": "string"
        },
        "AreaSize": {
          "format": "float",
          "description": "Size of the area",
          "type": "number"
        },
        "TenancyGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique tenancy identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        }
      }
    },
    "RatingValuationDetails": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "int32",
          "type": "integer"
        },
        "Title": {
          "type": "string"
        },
        "ValuationDate": {
          "format": "date-time",
          "type": "string"
        },
        "ValuationLandValue": {
          "format": "double",
          "type": "number"
        },
        "ValuationImprovementsValue": {
          "format": "double",
          "type": "number"
        },
        "ValuationTotalValue": {
          "format": "double",
          "type": "number"
        },
        "IsActive": {
          "type": "boolean"
        },
        "Comment": {
          "type": "string"
        }
      }
    },
    "PropertyGroupInfo": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "type": "string"
        }
      }
    },
    "ManagerDetails": {
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique user identifier, the specified user that will be the property manager for the property, the user must be set as a property manager",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Email": {
          "description": "User email, used to identify the user that will be the property manager for the property if no ManagerId is provided, the user must be set as a property manager",
          "type": "string"
        }
      }
    },
    "LeaseLookup": {
      "description": "A reference to a customer-defined lookup value (id + display name).",
      "type": "object",
      "properties": {
        "Id": {
          "format": "int32",
          "description": "Lookup identifier.",
          "type": "integer"
        },
        "Name": {
          "description": "Lookup display name.",
          "type": "string"
        }
      }
    },
    "TenantData": {
      "required": [
        "GlobalIdentifier",
        "Name"
      ],
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique tenant identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "Name of the tenant",
          "maxLength": 500,
          "minLength": 0,
          "type": "string"
        },
        "FirstName": {
          "description": "First name of the tenant",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "LastName": {
          "description": "Last name of the tenant",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "MobileNumber": {
          "description": "Mobile number of the tenant",
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "PhoneNumber": {
          "description": "Phone number of the tenant",
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "Email": {
          "description": "Email address of the tenant",
          "maxLength": 500,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "LeaseArea": {
      "type": "object",
      "properties": {
        "AreaId": {
          "format": "int32",
          "type": "integer"
        },
        "AreaTitle": {
          "type": "string"
        }
      }
    },
    "LeaseTerm": {
      "description": "Lease term data",
      "type": "object",
      "properties": {
        "StartDateUtc": {
          "format": "date-time",
          "description": "Term start date in UTC",
          "type": "string"
        },
        "ExpiryDateUtc": {
          "format": "date-time",
          "description": "Term expiry date in UTC",
          "type": "string"
        },
        "IsCancelled": {
          "description": "Indicates if the term has been cancelled",
          "type": "boolean"
        },
        "IsComplete": {
          "description": "Indicates if the term is complete",
          "type": "boolean"
        },
        "IsRenewal": {
          "description": "Indicates if this term is a renewal of a previous term",
          "type": "boolean"
        },
        "IsRollingTerm": {
          "description": "Indicates if this is a rolling term",
          "type": "boolean"
        },
        "IsVacating": {
          "description": "Indicates if tenant is vacating",
          "type": "boolean"
        },
        "WillHoldOverAfterTermExpires": {
          "description": "Indicates if tenant will hold over after term expires",
          "type": "boolean"
        },
        "RenewalOptions": {
          "description": "Collection of renewal options for the term",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RenewalOptionDetails"
          }
        }
      }
    },
    "LeaseBreakDetails": {
      "description": "A break clause on the tenancy, with its scheduled occurrences.",
      "type": "object",
      "properties": {
        "Id": {
          "format": "int32",
          "description": "Break clause identifier.",
          "type": "integer"
        },
        "LeaseBreakTypeId": {
          "format": "int32",
          "description": "Identifier of the customer-defined break type.",
          "type": "integer"
        },
        "Title": {
          "description": "Break clause title.",
          "type": "string"
        },
        "Description": {
          "description": "Break clause description.",
          "type": "string"
        },
        "Notes": {
          "description": "Break clause notes.",
          "type": "string"
        },
        "Occurrences": {
          "description": "Scheduled occurrences of this break clause.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/LeaseBreakOccurrenceDetails"
          }
        }
      }
    },
    "LeaseRentReview": {
      "description": "The current/next pending rent review on the tenancy.",
      "type": "object",
      "properties": {
        "Id": {
          "format": "int32",
          "description": "Rent review identifier.",
          "type": "integer"
        },
        "ReviewDateUtc": {
          "format": "date-time",
          "description": "Review date (UTC).",
          "type": "string"
        },
        "IsComplete": {
          "description": "Indicates if the review is complete.",
          "type": "boolean"
        },
        "ReviewType": {
          "$ref": "#/definitions/LeaseLookup",
          "description": "The review basis / type (id + name)."
        }
      }
    },
    "LeaseNoticeToVacate": {
      "description": "Notice to vacate data for a tenancy",
      "type": "object",
      "properties": {
        "NoticeGivenDateUtc": {
          "format": "date-time",
          "description": "Date notice was given in UTC",
          "type": "string"
        },
        "MovingOutDateUtc": {
          "format": "date-time",
          "description": "Expected moving out date in UTC",
          "type": "string"
        },
        "VacateState": {
          "description": "Current vacate state",
          "type": "string"
        }
      }
    },
    "RenewalOptionDetails": {
      "description": "Renewal option details",
      "type": "object",
      "properties": {
        "OptionExpiryDateUtc": {
          "format": "date-time",
          "description": "Expiry date of the renewal option in UTC",
          "type": "string"
        },
        "ReminderDateUtc": {
          "format": "date-time",
          "description": "Date when the reminder is scheduled, if applicable",
          "type": "string"
        }
      }
    },
    "LeaseBreakOccurrenceDetails": {
      "description": "A single scheduled occurrence of a break clause.",
      "type": "object",
      "properties": {
        "Id": {
          "format": "int32",
          "description": "Occurrence identifier.",
          "type": "integer"
        },
        "BreakDateUtc": {
          "format": "date-time",
          "description": "Date the break can be exercised (UTC).",
          "type": "string"
        },
        "FinalNotificationDateUtc": {
          "format": "date-time",
          "description": "Final date by which notice must be served (UTC). Null if not set.",
          "type": "string"
        },
        "NoticeServedDateUtc": {
          "format": "date-time",
          "description": "Date notice was served (UTC). Null if not yet served.",
          "type": "string"
        },
        "CompletedDateUtc": {
          "format": "date-time",
          "description": "Date the break was completed (UTC). Null if not completed.",
          "type": "string"
        },
        "IsRollingBreak": {
          "description": "Indicates if this is a rolling break.",
          "type": "boolean"
        },
        "Status": {
          "description": "Break occurrence status (e.g. Active, NotExercised, NoticeServed, ExercisedAndVacating, ExercisedAndContinuing).",
          "type": "string"
        }
      }
    },
    "InspectionUpdateRequest": {
      "description": "Object used to update an inspection.",
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique inspection identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "IsComplete": {
          "description": "Boolean that describes if the inspection has been completed",
          "type": "boolean"
        },
        "CompletedCost": {
          "format": "double",
          "description": "UTC Timestamp of when the inspection was completed, required when the inspection is completed",
          "type": "number"
        },
        "CompletedDateUtc": {
          "format": "date-time",
          "description": "Unique inspection identifier",
          "type": "string"
        },
        "ReportPdfUrl": {
          "description": "URL link to the report created for the inspection, used when inspection is completed, the report must be a pdf version",
          "type": "string"
        },
        "Comments": {
          "description": "General comments from the inspection, used when inspection is completed",
          "maxLength": 1500,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "InspectionCreateRequest": {
      "required": [
        "Title"
      ],
      "type": "object",
      "properties": {
        "PropertyGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique property identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "TenancyGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique tenancy identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "description": "Title of the inspection",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "DueDateStartUtc": {
          "format": "date-time",
          "description": "UTC Timestamp of when the inspection starts",
          "type": "string"
        },
        "DueDateEndUtc": {
          "format": "date-time",
          "description": "UTC Timestamp of when the inspection ends, DueDateEndUtc timestamp must be after DueDateStartUtc",
          "type": "string"
        },
        "Description": {
          "description": "Description of the inspection",
          "maxLength": 1500,
          "minLength": 0,
          "type": "string"
        },
        "Notes": {
          "description": "Notes for the inspection",
          "maxLength": 1500,
          "minLength": 0,
          "type": "string"
        },
        "Type": {
          "description": "Type of the inspection",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "OAuthInspectionCreateResult": {
      "type": "object",
      "properties": {
        "Success": {
          "type": "boolean"
        },
        "GlobalIdentifier": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "ModelState": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/ErrorState"
          }
        }
      }
    },
    "ErrorState": {
      "description": "Replicates the ModelStateDictionary so that the ModelState for legacy apis can be serialised correctly.\r\nThis is really nasty. We need to get rid of this when we can.",
      "type": "object",
      "properties": {
        "_errors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ApiModelStateErrorDetails"
          }
        },
        "<Value>k__BackingField": {
          "type": "string"
        }
      }
    },
    "ApiModelStateErrorDetails": {
      "type": "object",
      "properties": {
        "<Exception>k__BackingField": {
          "type": "string"
        },
        "<ErrorMessage>k__BackingField": {
          "type": "string"
        }
      }
    },
    "InsurancePolicyDataModel": {
      "description": "A page of insurance policies.",
      "required": [
        "InsurancePolicies"
      ],
      "type": "object",
      "properties": {
        "InsurancePolicies": {
          "description": "Collection of insurance policies, in a stable order for paging.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/InsurancePolicyData"
          }
        },
        "MetaData": {
          "$ref": "#/definitions/MetaData",
          "description": "Paging details. MetaData.NextPageUrl is the url of the next page (with the same filters), or null on the last page."
        }
      }
    },
    "InsurancePolicyData": {
      "description": "An insurance policy: a tenant's insurance (linked to tenancies), a supplier's insurance (linked to a contact)\r\nor a property's own insurance.",
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Unique insurance policy identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Type": {
          "description": "The kind of policy. Tenant = a tenant's insurance, linked to tenancies (TenancyIds);\r\nSupplier = a supplier's insurance, linked to a contact (ContactId); Property = the property's own insurance (PropertyId).",
          "enum": [
            "Tenant",
            "Supplier",
            "Property"
          ],
          "type": "string"
        },
        "PolicyNumber": {
          "description": "Policy number as recorded on the certificate. Always null on Property policies, which have no policy number.",
          "type": "string"
        },
        "InsurerName": {
          "description": "Name of the insurer. Null when not recorded.",
          "type": "string"
        },
        "InsuranceType": {
          "$ref": "#/definitions/InsuranceTypeData",
          "description": "The customer-configured insurance type, e.g. \"Public Liability\"."
        },
        "CoverAmountType": {
          "description": "How the cover is expressed. SpecifiedAmount = CoverAmount is the sum insured;\r\nReplacementValue = cover is the replacement value (CapAmount, when set, caps it); Unlimited = no limit (CoverAmount is null).",
          "enum": [
            "SpecifiedAmount",
            "ReplacementValue",
            "Unlimited"
          ],
          "type": "string"
        },
        "CoverAmount": {
          "format": "double",
          "description": "The sum insured. Null when the cover is not a specified amount.",
          "type": "number"
        },
        "CapAmount": {
          "format": "double",
          "description": "The cap on replacement-value cover. Null when there is no cap.",
          "type": "number"
        },
        "StartDate": {
          "format": "date-time",
          "description": "Date the policy starts.",
          "type": "string"
        },
        "ExpiryDate": {
          "format": "date-time",
          "description": "Date the policy expires. Use with the expiryFrom / expiryTo filters to find upcoming expiries.",
          "type": "string"
        },
        "Status": {
          "description": "Status derived from ExpiryDate, matching the insurance hub. Current = not expiring in the next 30 days;\r\nExpiringSoon = expires within 30 days; Expired = the expiry date has passed.",
          "enum": [
            "Current",
            "ExpiringSoon",
            "Expired"
          ],
          "type": "string"
        },
        "Broker": {
          "$ref": "#/definitions/InsuranceBrokerData",
          "description": "The broker contact who arranged the policy. Null when there is no broker."
        },
        "TenancyIds": {
          "description": "Unique identifiers of the tenancies a Tenant policy covers. Empty for Supplier and Property policies.",
          "type": "array",
          "items": {
            "format": "uuid",
            "type": "string",
            "example": "00000000-0000-0000-0000-000000000000"
          }
        },
        "ContactId": {
          "format": "uuid",
          "description": "Unique identifier of the insured supplier contact. Supplier policies only; null for Tenant policies (which link to tenancies through TenancyIds) and Property policies.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "PropertyId": {
          "format": "uuid",
          "description": "Unique identifier of the property a Property policy insures. Null for Tenant and Supplier policies.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "description": "Policy title. Property policies only; null otherwise.",
          "type": "string"
        },
        "Premium": {
          "format": "double",
          "description": "Premium paid for the policy. Property policies only; null otherwise.",
          "type": "number"
        },
        "Excess": {
          "format": "double",
          "description": "Excess payable on a claim. Property policies only; null otherwise.",
          "type": "number"
        },
        "Amounts": {
          "description": "Itemised cover and excess amounts. Tenant and Supplier policies only; always empty for Property policies.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/InsurancePolicyAmount"
          }
        },
        "Attachments": {
          "description": "The policy's certificates. Download one with GET /api/insurance-policies/{id}/attachments/{attachmentId}/download.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/InsurancePolicyAttachment"
          }
        },
        "UpdatedDateUtc": {
          "format": "date-time",
          "description": "UTC timestamp the policy was last updated. Use with the updatedAfterDate filter to sync changes.",
          "type": "string"
        }
      }
    },
    "InsuranceTypeData": {
      "description": "A customer-configured insurance type.",
      "type": "object",
      "properties": {
        "Id": {
          "format": "int32",
          "description": "Insurance type identifier",
          "type": "integer"
        },
        "Name": {
          "description": "Insurance type name, e.g. \"Public Liability\"",
          "type": "string"
        }
      }
    },
    "InsuranceBrokerData": {
      "description": "The broker contact who arranged a policy.",
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Unique identifier of the broker contact",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "Broker name",
          "type": "string"
        }
      }
    },
    "InsurancePolicyAmount": {
      "description": "An itemised cover or excess amount on a property policy.",
      "type": "object",
      "properties": {
        "Label": {
          "description": "What the amount covers, e.g. \"Buildings\"",
          "type": "string"
        },
        "Amount": {
          "format": "double",
          "description": "The amount. Null for Unlimited cover.",
          "type": "number"
        },
        "Type": {
          "description": "Cover = a sum insured; Excess = an excess payable on a claim.",
          "enum": [
            "Cover",
            "Excess"
          ],
          "type": "string"
        },
        "CoverAmountType": {
          "description": "How the amount is expressed: SpecifiedAmount, ReplacementValue or Unlimited (see the policy's CoverAmountType). Set on every amount, Excess rows included.",
          "enum": [
            "SpecifiedAmount",
            "ReplacementValue",
            "Unlimited"
          ],
          "type": "string"
        },
        "CapAmount": {
          "format": "double",
          "description": "The cap on replacement-value cover. Null when there is no cap.",
          "type": "number"
        }
      }
    },
    "InsurancePolicyAttachment": {
      "description": "A certificate attached to a policy.",
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Unique attachment identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "FileName": {
          "description": "Original file name; the download is returned with this name.",
          "type": "string"
        },
        "UploadedDateUtc": {
          "format": "date-time",
          "description": "UTC timestamp the certificate was uploaded",
          "type": "string"
        }
      }
    },
    "InvoiceResponseModel": {
      "type": "object",
      "properties": {
        "Data": {
          "$ref": "#/definitions/Invoice",
          "readOnly": true
        }
      }
    },
    "Invoice": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "DisplayId": {
          "description": "The invoice number as shown on Web UI",
          "type": "string"
        },
        "Reference": {
          "description": "Additional reference number",
          "type": "string"
        },
        "Contact": {
          "$ref": "#/definitions/CompactContact",
          "description": "The contact the invoice is sending to."
        },
        "Company": {
          "$ref": "#/definitions/CompanyModel",
          "description": "The company the invoice is created by"
        },
        "Property": {
          "$ref": "#/definitions/PropertyModel",
          "description": "The related property"
        },
        "Type": {
          "enum": [
            "ACCPAY",
            "ACCREC"
          ],
          "type": "string"
        },
        "IssueDate": {
          "format": "date-time",
          "description": "Date invoice was issued",
          "type": "string"
        },
        "DueDate": {
          "format": "date-time",
          "description": "Date invoice is due",
          "type": "string"
        },
        "ServiceDate": {
          "format": "date-time",
          "description": "Date invoice was serviced",
          "type": "string"
        },
        "RentPeriodFromDate": {
          "format": "date-time",
          "description": "Start date of the rent period being invoiced. Populated for rent invoices generated by the rent invoice generator; null otherwise.",
          "type": "string"
        },
        "RentPeriodToDate": {
          "format": "date-time",
          "description": "End date of the rent period being invoiced. Populated for rent invoices generated by the rent invoice generator; null otherwise.",
          "type": "string"
        },
        "OutgoingsPeriodFromDate": {
          "format": "date-time",
          "description": "Start date of the outgoings period being invoiced. Populated for outgoings invoices; null otherwise.",
          "type": "string"
        },
        "OutgoingsPeriodToDate": {
          "format": "date-time",
          "description": "End date of the outgoings period being invoiced. Populated for outgoings invoices; null otherwise.",
          "type": "string"
        },
        "LineAmountTypes": {
          "description": "How line item amounts treat tax: Exclusive (tax added on top), Inclusive (amounts include tax) or NoTax.\r\nA single value for the whole invoice; the plural name matches the field in the invoice request and response JSON and is kept for compatibility",
          "enum": [
            "NoTax",
            "Inclusive",
            "Exclusive"
          ],
          "type": "string"
        },
        "Status": {
          "description": "Invoice status. Returned in UPPERCASE. UI labels: DRAFT=Draft, SUBMITTED=Awaiting Approval, AUTHORISED=Approved, VOIDED=Voided, DELETED=Deleted, PAID=Paid.\r\n\"Overdue\"/\"Due Today\"/\"Part Paid\" are UI-only states derived from an AUTHORISED invoice; all return here as AUTHORISED.",
          "enum": [
            "None",
            "DRAFT",
            "AUTHORISED",
            "VOIDED",
            "SUBMITTED",
            "DELETED",
            "PAID"
          ],
          "type": "string"
        },
        "CreatedDate": {
          "format": "date-time",
          "description": "The time the invoice was created within Re-Leased",
          "type": "string"
        },
        "AmountDue": {
          "format": "double",
          "description": "Amount remaining to be paid on invoice",
          "type": "number"
        },
        "AmountPaid": {
          "format": "double",
          "description": "Sum of payments received for invoice",
          "type": "number"
        },
        "SubTotal": {
          "format": "double",
          "description": "Total of invoice excluding taxes",
          "type": "number"
        },
        "TotalTax": {
          "format": "double",
          "description": "Total tax on invoice",
          "type": "number"
        },
        "Total": {
          "format": "double",
          "description": "Total of Invoice tax inclusive (i.e. SubTotal + TotalTax)",
          "type": "number"
        },
        "LineItems": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/InvoiceLineItem"
          }
        },
        "Payments": {
          "description": "Lists of invoice payments against this invoice",
          "type": "array",
          "items": {
            "$ref": "#/definitions/InvoicePayment"
          }
        },
        "Attachments": {
          "description": "Lists of invoice attachments related to this invoice",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Attachment"
          }
        },
        "UpdatedDate": {
          "format": "date-time",
          "description": "The date and time (UTC) the entity was last updated",
          "type": "string"
        }
      }
    },
    "CompactContact": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "The id of this contact",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "The name of the contact person or company",
          "type": "string"
        },
        "FirstName": {
          "description": "The first name of this contact",
          "type": "string"
        },
        "LastName": {
          "description": "The last name of this contact",
          "type": "string"
        },
        "Email": {
          "description": "The email of this contact",
          "type": "string"
        }
      }
    },
    "CompanyModel": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "The id of the company",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "The name of this company",
          "type": "string"
        }
      }
    },
    "PropertyModel": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "The id of the property",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "The name of the property",
          "type": "string"
        },
        "Type": {
          "description": "The type of this property, example values are 'Office/Residential', 'Commercial' and 'Retail' etc",
          "type": "string"
        },
        "Address": {
          "description": "The address of this property",
          "type": "string"
        },
        "Tenancy": {
          "$ref": "#/definitions/TenancyModel",
          "description": "The related tenancy"
        },
        "PropertyManager": {
          "$ref": "#/definitions/PropertyManager",
          "description": "The related property manager"
        },
        "PropertyOwner": {
          "$ref": "#/definitions/PropertyOwner",
          "description": "The related property owner"
        }
      }
    },
    "InvoiceLineItem": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Line item id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Description": {
          "description": "Description of line item",
          "type": "string"
        },
        "Quantity": {
          "format": "double",
          "description": "Quantity of item",
          "type": "number"
        },
        "UnitAmount": {
          "format": "double",
          "description": "Unit amount of the line item",
          "type": "number"
        },
        "TaxAmount": {
          "format": "double",
          "description": "Total tax amount for line item",
          "type": "number"
        },
        "TaxType": {
          "description": "Tax type for the line item",
          "type": "string"
        },
        "AccountCode": {
          "description": "Account code for the line item",
          "type": "string"
        },
        "Tracking": {
          "description": "Tracking categories assigned to this line item. Empty when no tracking is set.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/LineItemTracking"
          }
        }
      }
    },
    "InvoicePayment": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Id of the payment",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "PaymentDate": {
          "format": "date-time",
          "description": "Date that the payment is made on",
          "type": "string"
        },
        "Amount": {
          "format": "double",
          "description": "Paid amount",
          "type": "number"
        }
      }
    },
    "Attachment": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "type": "string"
        },
        "FileSize": {
          "format": "int64",
          "type": "integer"
        },
        "DownloadLink": {
          "type": "string"
        },
        "MimeType": {
          "type": "string"
        }
      }
    },
    "TenancyModel": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "The id of the tenancy",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "description": "The tenancy title",
          "type": "string"
        },
        "PropertyId": {
          "format": "uuid",
          "description": "The id of property where this tenancy is associated to",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "DatePaidTo": {
          "format": "date-time",
          "description": "The date of last day for the current tenancy period",
          "type": "string"
        }
      }
    },
    "PropertyManager": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "The id of this property manager",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "The full name of this property manager",
          "type": "string"
        },
        "FirstName": {
          "description": "The first name of this property manager",
          "type": "string"
        },
        "LastName": {
          "description": "The last name of this property manager",
          "type": "string"
        },
        "EmailAddress": {
          "description": "The email of this property manager",
          "type": "string"
        }
      }
    },
    "PropertyOwner": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "The id of this property owner",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "The full name of this property owner",
          "type": "string"
        },
        "FirstName": {
          "description": "The first name of this property owner",
          "type": "string"
        },
        "LastName": {
          "description": "The last name of this property owner",
          "type": "string"
        },
        "EmailAddress": {
          "description": "The email of this property owner",
          "type": "string"
        }
      }
    },
    "CreateInvoiceRequest": {
      "required": [
        "CompanyId",
        "ContactId",
        "Type",
        "IssueDate",
        "DueDate",
        "Status",
        "LineAmountTypes",
        "LineItems"
      ],
      "type": "object",
      "properties": {
        "CompanyId": {
          "format": "uuid",
          "description": "The unique identifier of the company",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "ContactId": {
          "format": "uuid",
          "description": "The unique identifier of customer's contact",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Type": {
          "description": "Type of invoice",
          "enum": [
            "ACCPAY",
            "ACCREC"
          ],
          "type": "string"
        },
        "IssueDate": {
          "format": "date-time",
          "description": "Issue date of invoice",
          "type": "string"
        },
        "DueDate": {
          "format": "date-time",
          "description": "Due date of invoice",
          "type": "string"
        },
        "AmountPaid": {
          "format": "double",
          "description": "Amount have been paid to invoice",
          "type": "number"
        },
        "SubTotal": {
          "format": "double",
          "description": "Sub total of invoice",
          "type": "number"
        },
        "Status": {
          "description": "Status to create the invoice with. Send in UPPERCASE (e.g. \"AUTHORISED\"); values are matched case-insensitively.\r\n\"None\" is not a valid status to create with and fails validation. The status requested must be one the authenticated user has permission for:\r\nDRAFT/SUBMITTED need create-invoice permission, AUTHORISED needs invoice-approval permission,\r\nVOIDED needs void-invoice, DELETED needs delete-invoice, PAID needs process-payments.",
          "enum": [
            "None",
            "DRAFT",
            "AUTHORISED",
            "VOIDED",
            "SUBMITTED",
            "DELETED",
            "PAID"
          ],
          "type": "string"
        },
        "LineAmountTypes": {
          "description": "The type of invoice line amount",
          "enum": [
            "NoTax",
            "Inclusive",
            "Exclusive"
          ],
          "type": "string"
        },
        "LineItems": {
          "description": "Attached invoice line items",
          "type": "array",
          "items": {
            "$ref": "#/definitions/InvoiceLineItemCreateModel"
          }
        },
        "PropertyId": {
          "format": "uuid",
          "description": "Related property id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "TenancyId": {
          "format": "uuid",
          "description": "Related tenant id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Reference": {
          "description": "The reference of the invoice",
          "type": "string"
        },
        "ServiceDate": {
          "format": "date-time",
          "description": "The date that the invoice was serviced",
          "type": "string"
        },
        "IsPaymentRequest": {
          "type": "boolean"
        },
        "IsPartialPeriodInvoice": {
          "type": "boolean"
        }
      },
      "example": {
        "CompanyId": "1d87c0f7-c230-4768-9033-05b3b1e130c6",
        "ContactId": "d928e6c9-32cf-497d-8ab4-5b3861398aa4",
        "Type": "ACCPAY",
        "IssueDate": "2026-11-15T11:56:47.2419818Z",
        "DueDate": "2026-11-15T11:56:47.2419818Z",
        "AmountPaid": 0.0,
        "SubTotal": 1000.0,
        "Status": "AUTHORISED",
        "LineAmountTypes": "Exclusive",
        "LineItems": [
          {
            "Description": "Test",
            "Quantity": 1,
            "UnitAmount": 1000.0,
            "TaxType": "NONE",
            "AccountCode": "0001"
          }
        ],
        "IsPaymentRequest": false,
        "IsPartialPeriodInvoice": false
      }
    },
    "InvoiceLineItemCreateModel": {
      "required": [
        "Description",
        "Quantity",
        "UnitAmount",
        "TaxType",
        "AccountCode"
      ],
      "type": "object",
      "properties": {
        "Description": {
          "description": "Description of line item",
          "type": "string"
        },
        "Quantity": {
          "format": "int32",
          "description": "Quantity per line item",
          "type": "integer"
        },
        "UnitAmount": {
          "format": "double",
          "description": "Amount per unit for the line item",
          "type": "number"
        },
        "TaxType": {
          "description": "Tax type code. Can use https://api.re-leased.com/api/taxtypes/{companyId} to get the tax types",
          "type": "string"
        },
        "AccountCode": {
          "description": "Account code. Can use https://api.re-leased.com/api/accounts to get the account codes",
          "type": "string"
        }
      }
    },
    "InvoiceModel": {
      "type": "object",
      "properties": {
        "Data": {
          "$ref": "#/definitions/Invoice",
          "description": "Response envelope"
        }
      }
    },
    "UpdateInvoiceRequest": {
      "required": [
        "Id"
      ],
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "The id of the invoice",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "ContactId": {
          "format": "uuid",
          "description": "The unique identifier of customer's contact",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "IssueDate": {
          "format": "date-time",
          "description": "Issue date of invoice",
          "type": "string"
        },
        "DueDate": {
          "format": "date-time",
          "description": "Due date of invoice",
          "type": "string"
        },
        "Status": {
          "description": "New status for the invoice. Send in UPPERCASE (e.g. \"AUTHORISED\"); values are matched case-insensitively.\r\nOptional - omit to leave the status unchanged. \"None\" is not a valid status to set and fails validation.\r\nThe status requested must be one the authenticated user has permission for: DRAFT/SUBMITTED and PAID need edit-invoice permission,\r\nAUTHORISED needs invoice-approval permission, VOIDED needs void-invoice, DELETED needs delete-invoice.",
          "enum": [
            "None",
            "DRAFT",
            "AUTHORISED",
            "VOIDED",
            "SUBMITTED",
            "DELETED",
            "PAID"
          ],
          "type": "string"
        },
        "LineAmountTypes": {
          "description": "The type of invoice line amount",
          "enum": [
            "NoTax",
            "Inclusive",
            "Exclusive"
          ],
          "type": "string"
        },
        "LineItems": {
          "description": "Attached invoice line items",
          "type": "array",
          "items": {
            "$ref": "#/definitions/UpdateInvoiceLineItemRequest"
          }
        },
        "PropertyId": {
          "format": "uuid",
          "description": "Related property id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "TenancyId": {
          "format": "uuid",
          "description": "Related tenant id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Reference": {
          "description": "Reference of invoice",
          "type": "string"
        },
        "ServiceDate": {
          "format": "date-time",
          "type": "string"
        }
      },
      "example": {
        "Id": "efdb0dbc-eabd-4bb2-8954-cbe543d56691",
        "IssueDate": "2026-11-15T11:56:47.2419818Z",
        "DueDate": "2026-11-15T11:56:47.2419818Z",
        "Status": "AUTHORISED",
        "LineItems": [
          {
            "Id": "d7eace73-3a62-452a-99fa-e5a385356d2a",
            "Description": "Update",
            "Quantity": 10.0,
            "UnitAmount": 200.0,
            "TaxType": "NONE",
            "AccountCode": "2000"
          },
          {
            "Id": "00000000-0000-0000-0000-000000000000",
            "Description": "New",
            "Quantity": 1.0,
            "UnitAmount": 1000.0,
            "TaxType": "10%GST",
            "AccountCode": "1000"
          }
        ],
        "Reference": "May the force be with you"
      }
    },
    "UpdateInvoiceLineItemRequest": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "The id of line item， will be treated as new invoice line item if no id is provided.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Description": {
          "description": "Description of line item",
          "type": "string"
        },
        "Quantity": {
          "format": "double",
          "description": "Quantity per line item",
          "type": "number"
        },
        "UnitAmount": {
          "format": "double",
          "description": "Amount per unit for the line item",
          "type": "number"
        },
        "TaxType": {
          "description": "Tax type code. Can use https://api.re-leased.com/api/taxtypes/{companyId} to get the tax types",
          "type": "string"
        },
        "AccountCode": {
          "description": "Account code. Can use https://api.re-leased.com/api/accounts to get the account codes",
          "type": "string"
        }
      }
    },
    "MaintenanceDataModel": {
      "description": "Maintenance data model",
      "required": [
        "Maintenance"
      ],
      "type": "object",
      "properties": {
        "Maintenance": {
          "description": "List of maintenance",
          "type": "array",
          "items": {
            "$ref": "#/definitions/MaintenanceData"
          }
        }
      }
    },
    "MaintenanceData": {
      "required": [
        "UserTimeZone",
        "FromDateUtc",
        "FromDateLocal",
        "ToDateUtc",
        "ToDateLocal",
        "Type",
        "IsComplete",
        "Property"
      ],
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique maintenance identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "UserTimeZone": {
          "description": "Time zone of the authorized user",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "FromDateUtc": {
          "format": "date-time",
          "description": "Maintenance start date UTC timestamp",
          "type": "string"
        },
        "FromDateLocal": {
          "format": "date-time",
          "description": "Maintenance start date in the authorized users local time zone",
          "type": "string"
        },
        "ToDateUtc": {
          "format": "date-time",
          "description": "Maintenance end date UTC timestamp",
          "type": "string"
        },
        "ToDateLocal": {
          "format": "date-time",
          "description": "Maintenance end date in the authorized users local time zone",
          "type": "string"
        },
        "Type": {
          "description": "Name of the maintenance type",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "Category": {
          "description": "Name of the maintenance category",
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "IsComplete": {
          "description": "Boolean that describes whther the maintenance is complete or incomplete",
          "type": "boolean"
        },
        "Description": {
          "description": "Description provided for the maintenance",
          "maxLength": 1500,
          "minLength": 0,
          "type": "string"
        },
        "Notes": {
          "description": "Notes for the maintenance task as shown in Re-Leased, including any notes recorded when it was completed. Null when there are none.",
          "maxLength": 1500,
          "minLength": 0,
          "type": "string"
        },
        "Property": {
          "$ref": "#/definitions/PropertyData",
          "description": "The related property data for the maintenance"
        },
        "Tenancy": {
          "$ref": "#/definitions/TenancyData",
          "description": "The related tenancy data for the maintenance"
        },
        "Title": {
          "description": "Title for the Maintenance",
          "type": "string"
        },
        "AreaId": {
          "format": "int32",
          "description": "AreaId for the Maintenance",
          "type": "integer"
        },
        "DelegatedUserGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique Delegated User identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Url": {
          "description": "Url for a Re-Leased user to open the maintenance task.",
          "type": "string"
        },
        "Tags": {
          "description": "Names of the active tags assigned to the maintenance task. Only present when the request\r\nopted in via includeTags=true; empty when the task carries no tags. Tags are shared across\r\nthe company's billing group, so a tag assigned by a sibling company is included.\r\n            \r\nNames are normalised on save - lowercased with spaces removed - so a tag entered as\r\n\"Fire Safety\" comes back as \"firesafety\". Some older tags predate that, so compare\r\ncase-insensitively rather than assuming lower case.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "Status": {
          "description": "Maintenance task status as shown in Re-Leased. One of: Incomplete, Complete, Cancelled.",
          "type": "string"
        },
        "BudgetedCost": {
          "format": "double",
          "description": "Budgeted cost of the maintenance task",
          "type": "number"
        },
        "CompletedCost": {
          "format": "double",
          "description": "Cost recorded when the maintenance task was completed",
          "type": "number"
        },
        "CompletedDateUtc": {
          "format": "date-time",
          "description": "When the maintenance task was completed, UTC",
          "type": "string"
        },
        "WorkOrders": {
          "description": "Active work orders raised from the maintenance task. Empty when there are none.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/MaintenanceWorkOrderData"
          }
        },
        "LinkedInvoices": {
          "description": "Invoices linked to the maintenance task but not to one of its work orders. Invoices linked to a work order appear\r\non that work order instead. Voided and deleted invoices are included with their status. Empty when none are linked,\r\nand null when the authorised user does not have invoice access.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/MaintenanceLinkedInvoiceData"
          }
        }
      }
    },
    "MaintenanceWorkOrderData": {
      "description": "A work order raised from a maintenance task and sent to a supplier.",
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique work order identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "WorkOrderNumber": {
          "description": "Work order number as shown in Re-Leased and on the work order sent to the supplier, zero-padded to seven digits",
          "type": "string"
        },
        "ExternalReference": {
          "description": "External reference entered on the work order",
          "type": "string"
        },
        "Status": {
          "description": "Work order status as shown in Re-Leased. One of: Draft, AwaitingApproval, Approved, Sent, Complete, Cancelled.",
          "type": "string"
        },
        "BudgetedCost": {
          "format": "double",
          "description": "Budgeted cost of the work order",
          "type": "number"
        },
        "DueDateUtc": {
          "format": "date-time",
          "description": "Work order due date UTC timestamp",
          "type": "string"
        },
        "SupplierGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique identifier of the supplier contact the work order is for",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "SupplierName": {
          "description": "Name of the supplier contact the work order is for",
          "type": "string"
        },
        "Description": {
          "description": "Description of the work",
          "type": "string"
        },
        "NatureOfWork": {
          "description": "Nature of the work",
          "type": "string"
        },
        "Priority": {
          "description": "Work order priority. One of: None, Low, Medium, High, Urgent.",
          "type": "string"
        },
        "SentDateUtc": {
          "format": "date-time",
          "description": "When the work order was emailed to the supplier, UTC. Null when it has not been sent.",
          "type": "string"
        },
        "CreatedDateUtc": {
          "format": "date-time",
          "description": "When the work order was created, UTC",
          "type": "string"
        },
        "UpdatedDateUtc": {
          "format": "date-time",
          "description": "When the work order was last updated, UTC",
          "type": "string"
        },
        "LinkedInvoices": {
          "description": "Invoices linked to this work order. Invoices linked only to the task appear on the task instead. Voided and deleted\r\ninvoices are included with their status. Empty when none are linked, and null when the authorised user does not\r\nhave invoice access.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/MaintenanceLinkedInvoiceData"
          }
        }
      }
    },
    "MaintenanceLinkedInvoiceData": {
      "description": "An invoice linked to a maintenance task or work order.",
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique invoice identifier, for use with GET /api/invoices/{id}",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Status": {
          "description": "Invoice status, in UPPERCASE. One of: DRAFT, SUBMITTED, AUTHORISED, PAID, VOIDED, DELETED. A deleted invoice can no longer be retrieved by id.",
          "type": "string"
        }
      }
    },
    "MaintenanceUpdateRequest": {
      "description": "Object used to update an maintenance.",
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique maintenance identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "IsComplete": {
          "description": "Optional. Whether the maintenance has been completed. Leave it out together with Tags to change only the\r\ntags: the task's status and completion stay as they are. Without Tags, leaving it out still means not\r\ncomplete, and the task is set back to not complete.",
          "type": "boolean"
        },
        "CompletedCost": {
          "format": "double",
          "description": "UTC Timestamp of when the maintenance was completed, required when the maintenance is completed",
          "type": "number"
        },
        "CompletedDateUtc": {
          "format": "date-time",
          "description": "Unique maintenance identifier",
          "type": "string"
        },
        "Comments": {
          "description": "General comments from the maintenance, used when maintenance is completed",
          "maxLength": 1500,
          "minLength": 0,
          "type": "string"
        },
        "Images": {
          "description": "Image for the maintenance in base64 string",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Base64EncodedImage"
          }
        },
        "Tags": {
          "description": "Optional. The complete set of tag names for the maintenance task, replacing the tags it has. Leave it out or\r\nsend null to leave the tags unchanged; send an empty list to remove them all. Inspections take no tags, so\r\nsending Tags for one is rejected.\r\n<br /><br />\r\nNames are cleaned the way the app cleans them: trimmed, spaces and &lt; &gt; removed, and lowercased. A name\r\ncan be at most 100 characters once cleaned. At most 100 names per request.\r\n<br /><br />\r\nA name with no active match in your billing group creates a tag. That needs the user's role to allow\r\n\"Can create, rename and archive tags\"; without it the request is rejected with 400 and nothing is saved.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Base64EncodedImage": {
      "type": "object",
      "properties": {
        "FileName": {
          "type": "string"
        },
        "Data": {
          "type": "string"
        }
      }
    },
    "MaintenanceCreateRequest": {
      "required": [
        "PropertyGlobalIdentifier",
        "Title",
        "DueDateStartUtc"
      ],
      "type": "object",
      "properties": {
        "PropertyGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique property identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "TenancyGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique tenancy identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "description": "Title of the maintenance",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "DueDateStartUtc": {
          "format": "date-time",
          "description": "UTC Timestamp of when the maintenance starts",
          "type": "string"
        },
        "Images": {
          "description": "Image for the maintenance in base64 string",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Base64EncodedImage"
          }
        },
        "Description": {
          "description": "Description of the maintenance",
          "maxLength": 1500,
          "minLength": 0,
          "type": "string"
        },
        "Notes": {
          "description": "Notes for the maintenance",
          "maxLength": 1500,
          "minLength": 0,
          "type": "string"
        },
        "Type": {
          "description": "Type of the maintenance",
          "type": "string"
        },
        "IsComplete": {
          "description": "Completion status of the maintenance",
          "type": "boolean"
        },
        "BudgetedCost": {
          "format": "double",
          "description": "Budgeted cost of the maintenance",
          "type": "number"
        },
        "CompletedCost": {
          "format": "double",
          "description": "Completed cost of the maintenance",
          "type": "number"
        },
        "TaxInclusive": {
          "description": "Tax Inclusive for the maintenance",
          "type": "boolean"
        },
        "DelegatedUserGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique delegated user identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "DelegatedUserId": {
          "format": "int32",
          "description": "Delegated User identifier",
          "type": "integer"
        },
        "AreaId": {
          "format": "int32",
          "description": "Area for the maintenance",
          "type": "integer"
        },
        "ContractorContactGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique contractor contact identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "ContractorContactId": {
          "format": "int32",
          "description": "Contractor Contact identifier",
          "type": "integer"
        },
        "Tags": {
          "description": "Optional. The complete set of tag names for the maintenance task. Leave it out or send null to leave the\r\ntags unchanged, so a new task has none; send an empty list to remove them all.\r\n<br /><br />\r\nNames are cleaned the way the app cleans them: trimmed, spaces and &lt; &gt; removed, and lowercased. A name\r\ncan be at most 100 characters once cleaned. At most 100 names per request.\r\n<br /><br />\r\nA name with no active match in your billing group creates a tag. That needs the user's role to allow\r\n\"Can create, rename and archive tags\"; without it the request is rejected with 400 and nothing is saved.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "OAuthMaintenanceCreateResult": {
      "type": "object",
      "properties": {
        "Success": {
          "type": "boolean"
        },
        "Message": {
          "type": "string"
        },
        "GlobalIdentifier": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        }
      }
    },
    "NoteDataModel": {
      "description": "A page of notes.",
      "required": [
        "Notes"
      ],
      "type": "object",
      "properties": {
        "Notes": {
          "description": "Collection of notes. GET /api/tenancies/{id}/notes returns them newest first; GET /api/notes in a stable paging order.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/NoteData"
          }
        },
        "MetaData": {
          "$ref": "#/definitions/MetaData",
          "description": "Paging details. MetaData.NextPageUrl is the next page's url, or null on the last page. Not returned by GET /api/tenancies/{id}/notes, which returns every note in one response."
        }
      }
    },
    "NoteData": {
      "description": "A note recorded against a property, tenancy or contact.",
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Unique note identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "description": "Note title. Null when the note was saved without one.",
          "type": "string"
        },
        "Content": {
          "description": "Note body text.",
          "type": "string"
        },
        "NoteType": {
          "$ref": "#/definitions/NoteTypeData",
          "description": "The customer-configured type of the note. Arrears notes have IsArrearsNote = true; these are\r\nthe notes shown in the arrears hub. Null when the note has no type."
        },
        "RecordedDate": {
          "format": "date-time",
          "description": "The date the note was recorded against, as entered by the user (can differ from CreatedDateUtc).",
          "type": "string"
        },
        "CreatedDateUtc": {
          "format": "date-time",
          "description": "UTC timestamp the note was created.",
          "type": "string"
        },
        "UpdatedDateUtc": {
          "format": "date-time",
          "description": "UTC timestamp the note was last updated. Use with the updatedAfterDate filter to sync changes.",
          "type": "string"
        },
        "Author": {
          "$ref": "#/definitions/NoteAuthor",
          "description": "The user who wrote the note. Null when the author is unknown."
        },
        "PropertyId": {
          "format": "uuid",
          "description": "Unique identifier of the property the note is linked to. Null when the note is not linked to a property.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "TenancyId": {
          "format": "uuid",
          "description": "Unique identifier of the tenancy the note is linked to. Null when the note is not linked to a tenancy.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "ContactId": {
          "format": "uuid",
          "description": "Unique identifier of the contact the note is linked to. Null when the note is not linked to a contact.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Tags": {
          "description": "Names of the active tags assigned to the note. Empty when the note carries no tags.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "NoteTypeData": {
      "description": "A customer-configured note type.",
      "type": "object",
      "properties": {
        "Id": {
          "format": "int32",
          "description": "Note type identifier. Use as the noteTypeId filter on GET /api/notes.",
          "type": "integer"
        },
        "Name": {
          "description": "Note type display name, e.g. \"Arrears\" or \"General\".",
          "type": "string"
        },
        "IsArrearsNote": {
          "description": "True when notes of this type are arrears notes (shown in the arrears hub).",
          "type": "boolean"
        },
        "IsInvoiceNote": {
          "description": "True when notes of this type are invoice notes. Invoice notes are only returned when invoice notes are enabled for the company.",
          "type": "boolean"
        }
      }
    },
    "NoteAuthor": {
      "description": "The user who wrote a note.",
      "type": "object",
      "properties": {
        "Name": {
          "description": "Author's full name.",
          "type": "string"
        },
        "Email": {
          "description": "Author's e-mail address.",
          "type": "string"
        }
      }
    },
    "NoteTypeDataModel": {
      "description": "The customer's note types.",
      "required": [
        "NoteTypes"
      ],
      "type": "object",
      "properties": {
        "NoteTypes": {
          "description": "Collection of active note types.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/NoteTypeData"
          }
        }
      }
    },
    "PaymentsResponseModel": {
      "type": "object",
      "properties": {
        "Data": {
          "description": "Response envelope",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Payment"
          }
        },
        "MetaData": {
          "$ref": "#/definitions/MetaData",
          "description": "Meta data of the result"
        }
      }
    },
    "Payment": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "PaymentDate": {
          "format": "date-time",
          "description": "Date of payment",
          "type": "string"
        },
        "Amount": {
          "format": "double",
          "description": "Amount paid",
          "type": "number"
        },
        "Reference": {
          "description": "Payment reference",
          "type": "string"
        },
        "PaymentStatus": {
          "description": "Status of the payment",
          "enum": [
            "Authorised",
            "Deleted"
          ],
          "type": "string"
        },
        "PaymentType": {
          "description": "Type of the payment",
          "enum": [
            "General",
            "OpeningBalanceForTrustAccounting",
            "ImportConversion",
            "Dishonour",
            "TenancyFundsTransfer"
          ],
          "type": "string"
        },
        "CreatedDate": {
          "format": "date-time",
          "description": "Payment created on",
          "type": "string"
        },
        "Invoice": {
          "$ref": "#/definitions/CompactInvoice",
          "description": "Payment against invoice"
        },
        "Company": {
          "$ref": "#/definitions/CompactCompany",
          "description": "Associated company of payment"
        },
        "UpdatedDate": {
          "format": "date-time",
          "description": "The date and time (UTC) the entity was last updated",
          "type": "string"
        }
      }
    },
    "CompactCompany": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Company Id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "Company name",
          "type": "string"
        }
      }
    },
    "CreatePaymentRequest": {
      "type": "object",
      "properties": {
        "InvoiceId": {
          "description": "Target invoice Id",
          "type": "string"
        },
        "AccountCode": {
          "description": "Code of account you are using to make the payment",
          "type": "string"
        },
        "DateOfPayment": {
          "format": "date-time",
          "description": "Date the payment is being made",
          "type": "string"
        },
        "Amount": {
          "format": "double",
          "description": "The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice",
          "type": "number"
        },
        "Reference": {
          "description": "Reference of the payment",
          "type": "string"
        }
      },
      "example": {
        "InvoiceId": "cf5b82e9-0dbc-4462-b42b-3944241b30d5",
        "AccountCode": 100,
        "DateOfPayment": "2026-11-15T11:56:47.2732272Z",
        "Amount": 1000,
        "Reference": "Payment against an expense invoice"
      }
    },
    "PutPaymentRequest": {
      "type": "object",
      "properties": {
        "PaymentId": {
          "description": "Payment id to update",
          "type": "string"
        },
        "ReversalReason": {
          "description": "Reason for reversing payment",
          "type": "string"
        }
      },
      "example": {
        "PaymentId": "413b76c9-2139-4f46-91f5-1f74a204c420",
        "ReversalReason": "Amount is not correct"
      }
    },
    "PaymentResponseModel": {
      "type": "object",
      "properties": {
        "Data": {
          "$ref": "#/definitions/Payment",
          "description": "Response envelope"
        }
      }
    },
    "InvoicePaymentsResponseModel": {
      "type": "object",
      "properties": {
        "Data": {
          "description": "Response envelope",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Payment"
          }
        }
      }
    },
    "PropertyDataModel": {
      "required": [
        "Properties"
      ],
      "type": "object",
      "properties": {
        "Properties": {
          "description": "Collection of properties",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PropertyData"
          }
        }
      }
    },
    "PropertyUpdateRequest": {
      "description": "Object used to update a property.",
      "required": [
        "GlobalIdentifier"
      ],
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique property identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "DateOfPurchase": {
          "format": "date-time",
          "description": "The purchase date of the property",
          "type": "string"
        },
        "OwnerFirstName": {
          "description": "The owner's first name",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "OwnerLastName": {
          "description": "The owner's last name",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "OwnerEmail": {
          "description": "The owner's email address",
          "maxLength": 500,
          "minLength": 0,
          "type": "string"
        },
        "CustomFields": {
          "description": "Optional custom field values to set. Omitting CustomFields (or sending an empty array) leaves all\r\ncustom fields unchanged; a listed field with a null / empty value clears it. Dropdowns are written\r\nby option label.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomFieldWriteEntry"
          }
        },
        "Tags": {
          "description": "Optional. The complete set of tag names for the property, replacing the tags it has. Leave it out or send\r\nnull to leave the tags unchanged; send an empty list to remove them all.\r\n<br /><br />\r\nNames are cleaned the way the app cleans them: trimmed, spaces and &lt; &gt; removed, and lowercased. A name\r\ncan be at most 100 characters once cleaned. At most 100 names per request.\r\n<br /><br />\r\nA name with no active match in your billing group creates a tag. That needs the user's role to allow\r\n\"Can create, rename and archive tags\"; without it the request is rejected with 400 and nothing is saved.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "CreatePropertyRequest": {
      "description": "Object used to create a new property. Areas, leases and keys are not created with the property\r\nshell - add areas via the Areas API after the property is created.",
      "required": [
        "Name",
        "CompanyId",
        "Type"
      ],
      "type": "object",
      "properties": {
        "Name": {
          "description": "Name of the property",
          "maxLength": 150,
          "minLength": 0,
          "type": "string"
        },
        "CompanyId": {
          "format": "uuid",
          "description": "Unique identifier of the owning company. The company must be in the caller's customer scope.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Type": {
          "description": "Property type (e.g. Office, Apartment, Retail)",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "UsageType": {
          "description": "Usage type of the property. Allowed values: \"Residential\", \"Commercial\", \"Mixed\", \"Agricultural\".",
          "type": "string"
        },
        "CustomReference": {
          "description": "Customer-supplied reference for the property",
          "maxLength": 150,
          "minLength": 0,
          "type": "string"
        },
        "OwnerGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique identifier of the owner. The user must be set as a property owner.\r\nRequired when the company has trust accounting enabled.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "PropertyGroupGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique identifier of the property group to associate this property with. Optional.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "TrustAccounting": {
          "$ref": "#/definitions/TrustAccountingDetails",
          "description": "Trust accounting details. Required when the company has trust accounting enabled; omit otherwise."
        },
        "CustomFields": {
          "description": "Optional custom field values to set on the new property, each identified by its FieldIdentifier.\r\nDropdowns are written by option label.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomFieldWriteEntry"
          }
        },
        "Tags": {
          "description": "Optional. The complete set of tag names for the property. Leave it out or send null to leave the tags\r\nunchanged, so a new property has none; send an empty list to remove them all.\r\n<br /><br />\r\nNames are cleaned the way the app cleans them: trimmed, spaces and &lt; &gt; removed, and lowercased. A name\r\ncan be at most 100 characters once cleaned. At most 100 names per request.\r\n<br /><br />\r\nA name with no active match in your billing group creates a tag. That needs the user's role to allow\r\n\"Can create, rename and archive tags\"; without it the request is rejected with 400 and nothing is saved.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "FlatNumber": {
          "description": "Flat Number of the property",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "StreetNumber": {
          "description": "Street of the property",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "Street": {
          "description": "Street of the property",
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        },
        "Suburb": {
          "description": "Suburb of the property",
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        },
        "TownCity": {
          "description": "Town/City of the property",
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        },
        "StateRegion": {
          "description": "State/Region of the property",
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        },
        "PostZipCode": {
          "description": "Post/Zip code of the property",
          "maxLength": 20,
          "minLength": 0,
          "type": "string"
        },
        "Country": {
          "description": "Name of the property country",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "DateOfPurchase": {
          "format": "date-time",
          "description": "The purchase date of the property",
          "type": "string"
        },
        "PurchasePrice": {
          "format": "double",
          "description": "The purchase price of the property",
          "type": "number"
        },
        "LandArea": {
          "format": "double",
          "description": "The land area of the property",
          "type": "number"
        },
        "FloorArea": {
          "format": "double",
          "description": "The floor area of the property",
          "type": "number"
        },
        "NumberOfBedrooms": {
          "format": "int32",
          "description": "Number of bedrooms for the property",
          "type": "integer"
        },
        "NumberOfBathrooms": {
          "format": "double",
          "description": "Number of bathrooms for the property",
          "type": "number"
        },
        "AllowsPets": {
          "description": "Flag indicating if the property allows pets",
          "type": "boolean"
        },
        "AllowsSmoking": {
          "description": "Flag indicating if the property allows smoking",
          "type": "boolean"
        },
        "AllowsUnattendedInspections": {
          "description": "Flag indicating if the property allows unattended inspections",
          "type": "boolean"
        },
        "IsFurnished": {
          "description": "Flag indicating if the property is furnished",
          "type": "boolean"
        }
      },
      "example": {
        "Name": "South Office",
        "CompanyId": "d4e5f6a7-b8c9-0123-defa-234567890123",
        "Type": "Office",
        "UsageType": "Commercial",
        "CustomReference": "PROP-100",
        "OwnerGlobalIdentifier": "e5f6a7b8-c9d0-1234-efab-345678901234",
        "PropertyGroupGlobalIdentifier": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "TrustAccounting": {
          "TrustAccountId": "f6a7b8c9-d0e1-2345-fabc-456789012345",
          "LedgerName": "Owner Ledger - South Office",
          "PaymentCode": "PROP-100",
          "PaymentReference": "Rent",
          "PaymentDetails": "South Office"
        },
        "CustomFields": [
          {
            "FieldIdentifier": "energy-rating",
            "Value": "B"
          },
          {
            "FieldIdentifier": "property-manager-notes",
            "Value": "Prime CBD location"
          }
        ],
        "Tags": [
          "commercial",
          "priority"
        ],
        "FlatNumber": "1",
        "StreetNumber": "500",
        "Street": "High Street",
        "Suburb": "Ahuriri",
        "TownCity": "Napier",
        "StateRegion": "Hawkes Bay",
        "PostZipCode": "4000",
        "Country": "New Zealand",
        "DateOfPurchase": "2026-11-15T11:56:47.2732272Z",
        "PurchasePrice": 1250000.0,
        "LandArea": 1200.0,
        "FloorArea": 450.0,
        "NumberOfBedrooms": 0,
        "NumberOfBathrooms": 2.0
      }
    },
    "TrustAccountingDetails": {
      "description": "Trust accounting fields required when creating or updating a property for a customer\r\nwith trust accounting enabled. For non-trust-accounting customers, omit this block.",
      "required": [
        "TrustAccountId",
        "LedgerName"
      ],
      "type": "object",
      "properties": {
        "TrustAccountId": {
          "format": "uuid",
          "description": "Unique identifier of the trust account this property's default ledger sits under.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "LedgerName": {
          "description": "Display name for the default ledger (e.g. \"Owner Ledger - 123 High St\").",
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        },
        "PaymentCode": {
          "description": "Payment code shown on tenant payment instructions. Optional.",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "PaymentReference": {
          "description": "Payment reference shown on tenant payment instructions. Optional.",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "PaymentDetails": {
          "description": "Payment particulars / details shown on tenant payment instructions. Optional.",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "PropertyGroupDataModel": {
      "description": "Container for property group list response",
      "type": "object",
      "properties": {
        "PropertyGroups": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PropertyGroupData"
          }
        }
      }
    },
    "PropertyGroupData": {
      "description": "Property group data for public API response",
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Unique identifier for the property group",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "description": "Title of the property group",
          "type": "string"
        },
        "IsArchived": {
          "description": "Whether the property group is archived",
          "type": "boolean"
        },
        "CommonProperty": {
          "$ref": "#/definitions/CommonPropertyData",
          "description": "The common property for this group, if one exists"
        },
        "Properties": {
          "description": "List of properties in this group",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PropertyGroupPropertyData"
          }
        },
        "Company": {
          "$ref": "#/definitions/PropertyGroupCompanyData",
          "description": "Company that owns this property group"
        }
      }
    },
    "CommonPropertyData": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "type": "string"
        }
      }
    },
    "PropertyGroupPropertyData": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "type": "string"
        },
        "IsCommonProperty": {
          "type": "boolean"
        }
      }
    },
    "PropertyGroupCompanyData": {
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "type": "string"
        }
      }
    },
    "PropertyGroupSingleModel": {
      "description": "Container for single property group response",
      "type": "object",
      "properties": {
        "PropertyGroup": {
          "$ref": "#/definitions/PropertyGroupData"
        }
      }
    },
    "RentReviewDataModel": {
      "description": "A page of rent reviews",
      "required": [
        "RentReviews"
      ],
      "type": "object",
      "properties": {
        "RentReviews": {
          "description": "Collection of rent reviews, ordered by review date",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RentReviewData"
          }
        },
        "MetaData": {
          "$ref": "#/definitions/MetaData",
          "description": "Paging details. NextPageUrl is the request for the next page, or null when this is the last page."
        }
      }
    },
    "RentReviewData": {
      "description": "A scheduled or completed rent review on a tenancy",
      "required": [
        "Id",
        "TenancyId",
        "PropertyId",
        "ReviewDateUtc",
        "Status",
        "UpdatedDateUtc"
      ],
      "type": "object",
      "properties": {
        "Id": {
          "format": "uuid",
          "description": "Unique rent review identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "TenancyId": {
          "format": "uuid",
          "description": "Unique identifier of the tenancy the review belongs to",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "PropertyId": {
          "format": "uuid",
          "description": "Unique identifier of the property the tenancy is on",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "ReviewDateUtc": {
          "format": "date-time",
          "description": "Date the review is (or was) due (UTC)",
          "type": "string"
        },
        "OriginalReviewDateUtc": {
          "format": "date-time",
          "description": "The review date as first scheduled, when the review has since been moved to a different date (UTC). Null when the review date has never changed.",
          "type": "string"
        },
        "ReviewType": {
          "$ref": "#/definitions/RentReviewType",
          "description": "The basis of the review (e.g. CPI, Market, Fixed)"
        },
        "Description": {
          "description": "Free-text description of the review",
          "type": "string"
        },
        "Status": {
          "description": "Review status:\r\n<br />- <b>Pending</b>: not yet completed, and the review date is today or later (the company's local date).\r\n<br />- <b>Overdue</b>: not yet completed, and the review date is before today (the company's local date).\r\n<br />- <b>Completed</b>: the review has been completed. CompletedDateUtc, PreviousAnnualRent, NewRent and AdjustmentPercentage hold the outcome (CompletedDateUtc can be null on older reviews).",
          "enum": [
            "Pending",
            "Overdue",
            "Completed"
          ],
          "type": "string"
        },
        "CompletedDateUtc": {
          "format": "date-time",
          "description": "Date the review was completed (UTC). Null unless Status is Completed, and can also be null on completed reviews recorded before Re-Leased tracked completion dates.",
          "type": "string"
        },
        "PreviousAnnualRent": {
          "format": "double",
          "description": "Annual rent before the review. Null unless Status is Completed.",
          "type": "number"
        },
        "NewRent": {
          "format": "double",
          "description": "Rent agreed at the review. Null unless Status is Completed.",
          "type": "number"
        },
        "NewRentFrequency": {
          "description": "How often the reviewed rent recurs: Weekly, Monthly or Yearly. Null when not recorded, and always null unless Status is Completed.",
          "type": "string"
        },
        "AdjustmentPercentage": {
          "format": "double",
          "description": "Percentage change applied to the rent at the review (e.g. 3.5 for a 3.5% increase). Null unless Status is Completed.",
          "type": "number"
        },
        "AssignedTo": {
          "$ref": "#/definitions/RentReviewAssignee",
          "description": "The user the review is assigned to. Null when the review is unassigned."
        },
        "ReminderDatesUtc": {
          "description": "Dates reminders are set for this review (UTC). Empty when no reminders are set.",
          "type": "array",
          "items": {
            "format": "date-time",
            "type": "string"
          }
        },
        "UpdatedDateUtc": {
          "format": "date-time",
          "description": "Date the review was last updated (UTC)",
          "type": "string"
        }
      }
    },
    "RentReviewType": {
      "description": "The basis of a rent review (e.g. CPI, Market, Fixed).",
      "type": "object",
      "properties": {
        "IsPercentageCalculated": {
          "description": "True when this review type sets the new rent by applying a percentage to the previous rent\r\n(see AdjustmentPercentage on the review); false when the new rent is entered as an amount.",
          "type": "boolean"
        },
        "Id": {
          "format": "int32",
          "description": "Lookup identifier.",
          "type": "integer"
        },
        "Name": {
          "description": "Lookup display name.",
          "type": "string"
        }
      }
    },
    "RentReviewAssignee": {
      "description": "The user a rent review is assigned to.",
      "type": "object",
      "properties": {
        "Name": {
          "description": "Full name of the assigned user.",
          "type": "string"
        },
        "Email": {
          "description": "Email address of the assigned user.",
          "type": "string"
        }
      }
    },
    "SingleSignOn": {
      "required": [
        "SingleSignOnUrl"
      ],
      "type": "object",
      "properties": {
        "SingleSignOnUrl": {
          "description": "Single sign on URL based on the token",
          "type": "string"
        }
      }
    },
    "TaxTypeResponseModel": {
      "type": "object",
      "properties": {
        "Data": {
          "description": "Response envelope",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TaxType"
          }
        }
      }
    },
    "TaxType": {
      "type": "object",
      "properties": {
        "Code": {
          "description": "The code for the tax type",
          "type": "string"
        },
        "Rate": {
          "format": "double",
          "description": "The rate of the tax type",
          "type": "number"
        },
        "Name": {
          "description": "The name of the tax type",
          "type": "string"
        },
        "CanApplyToExpenses": {
          "description": "Flag indicating if the tax type can be applied to expenses",
          "type": "boolean"
        }
      }
    },
    "TenancyDataModel": {
      "description": "",
      "required": [
        "Tenancies"
      ],
      "type": "object",
      "properties": {
        "Tenancies": {
          "description": "Collection of tenancies",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TenancyData"
          }
        },
        "MetaData": {
          "$ref": "#/definitions/MetaData"
        }
      }
    },
    "CreateTenancyRequest": {
      "description": "Object used to create a new tenancy (lease shell + initial term). Rent, rent reviews, break\r\nclauses, deposits and additional contacts are out of scope for this iteration and are\r\nadded through follow-up endpoints.",
      "required": [
        "PropertyGlobalIdentifier",
        "PrimaryContactGlobalIdentifier",
        "Title",
        "StartDate",
        "EndDate",
        "IsResidential"
      ],
      "type": "object",
      "properties": {
        "PropertyGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique identifier of the property this tenancy is on. The property must be in the caller's\r\ncustomer scope.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "PrimaryContactGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique identifier of the primary tenant contact. The contact must be visible to the\r\nowning company.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Title": {
          "description": "Title / name of the tenancy.",
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "StartDate": {
          "format": "date-time",
          "description": "Tenancy start date (the first day of the initial term).",
          "type": "string"
        },
        "EndDate": {
          "format": "date-time",
          "description": "Tenancy end date (the last day of the initial term). Open-ended / rolling terms are\r\nout of scope for v1 - supply an explicit EndDate.",
          "type": "string"
        },
        "AreaIds": {
          "description": "Optional list of area Ids (integer) to allocate to this tenancy. Each area must belong to\r\nthe supplied property and be a lettable area type (non-lettable areas such as common areas\r\nare rejected). Area Ids are exposed by GET /api/tenancies and GET /api/properties.",
          "type": "array",
          "items": {
            "format": "int32",
            "type": "integer"
          }
        },
        "CustomReference": {
          "description": "Customer-supplied reference for the tenancy.",
          "maxLength": 2048,
          "minLength": 0,
          "type": "string"
        },
        "Notes": {
          "description": "Free-text notes / tenancy schedule clause.",
          "type": "string"
        },
        "IsResidential": {
          "description": "Whether the tenancy is residential (vs commercial / mixed / agricultural). Required.",
          "type": "boolean"
        },
        "IsInsideTheLandlordAndTenantAct": {
          "description": "Whether the tenancy is inside the Landlord &amp; Tenant Act. Required for UK commercial or\r\nmixed-use properties; leave null for residential or non-UK properties.",
          "type": "boolean"
        },
        "CustomFields": {
          "description": "Optional custom field values to set on the new tenancy, each identified by its FieldIdentifier.\r\nDropdowns are written by option label.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomFieldWriteEntry"
          }
        },
        "Tags": {
          "description": "Optional. The complete set of tag names for the tenancy. Leave it out or send null to leave the tags\r\nunchanged, so a new tenancy has none; send an empty list to remove them all.\r\n<br /><br />\r\nNames are cleaned the way the app cleans them: trimmed, spaces and &lt; &gt; removed, and lowercased. A name\r\ncan be at most 100 characters once cleaned. At most 100 names per request.\r\n<br /><br />\r\nA name with no active match in your billing group creates a tag. That needs the user's role to allow\r\n\"Can create, rename and archive tags\"; without it the request is rejected with 400 and nothing is saved.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "example": {
        "PropertyGlobalIdentifier": "d4e5f6a7-b8c9-0123-defa-234567890123",
        "PrimaryContactGlobalIdentifier": "e5f6a7b8-c9d0-1234-efab-345678901234",
        "Title": "Suite 200 - Acme Co",
        "StartDate": "2026-11-15T11:56:47.2888564Z",
        "EndDate": "2028-11-15T11:56:47.2888564Z",
        "AreaIds": [],
        "CustomReference": "TEN-100",
        "Notes": "Standard commercial lease",
        "IsResidential": false,
        "CustomFields": [
          {
            "FieldIdentifier": "lease-source",
            "Value": "Direct"
          },
          {
            "FieldIdentifier": "break-clause-year",
            "Value": "Year 3"
          }
        ],
        "Tags": [
          "commercial",
          "priority"
        ]
      }
    },
    "UpdateTenancyRequest": {
      "description": "Body used to update an existing tenancy. Only the fields you supply are changed; anything\r\nomitted is left as-is.",
      "type": "object",
      "properties": {
        "Title": {
          "description": "New title for the tenancy. Omit to leave unchanged.",
          "type": "string"
        },
        "CustomReference": {
          "description": "New customer-supplied reference. Omit to leave unchanged.",
          "type": "string"
        },
        "Notes": {
          "description": "New free-text notes / clause. Omit to leave unchanged.",
          "type": "string"
        },
        "CustomFields": {
          "description": "Optional custom field values to set. Omitting CustomFields (or sending an empty array) leaves all\r\ncustom fields unchanged; a listed field with a null / empty value clears it. Dropdowns are written\r\nby option label.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomFieldWriteEntry"
          }
        },
        "Tags": {
          "description": "Optional. The complete set of tag names for the tenancy, replacing the tags it has. Leave it out or send\r\nnull to leave the tags unchanged; send an empty list to remove them all.\r\n<br /><br />\r\nNames are cleaned the way the app cleans them: trimmed, spaces and &lt; &gt; removed, and lowercased. A name\r\ncan be at most 100 characters once cleaned. At most 100 names per request.\r\n<br /><br />\r\nA name with no active match in your billing group creates a tag. That needs the user's role to allow\r\n\"Can create, rename and archive tags\"; without it the request is rejected with 400 and nothing is saved.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "example": {
        "Title": "Suite 200 - Acme Co (renamed)",
        "CustomReference": "TEN-100-v2",
        "Notes": "Updated clause text",
        "CustomFields": [
          {
            "FieldIdentifier": "lease-source",
            "Value": "Broker"
          }
        ],
        "Tags": [
          "commercial",
          "priority"
        ]
      }
    },
    "TrustAccountDataModel": {
      "required": [
        "TrustAccounts"
      ],
      "type": "object",
      "properties": {
        "TrustAccounts": {
          "description": "List of trust accounts for the authorised user",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TrustAccountData"
          }
        }
      }
    },
    "TrustAccountData": {
      "required": [
        "GlobalIdentifier",
        "Name",
        "CustomerGlobalIdentifier"
      ],
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique trust account identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "Name": {
          "description": "Name of the trust account",
          "maxLength": 205,
          "minLength": 0,
          "type": "string"
        },
        "CustomerGlobalIdentifier": {
          "format": "uuid",
          "description": "Unique customer identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        }
      }
    },
    "UserData": {
      "required": [
        "GlobalIdentifier",
        "FirstName",
        "LastName",
        "Email"
      ],
      "type": "object",
      "properties": {
        "GlobalIdentifier": {
          "format": "uuid",
          "description": "Unique user identifier",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "FirstName": {
          "description": "The first name of the user",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "LastName": {
          "description": "The last name of the user",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        },
        "Email": {
          "description": "The email of the user",
          "maxLength": 100,
          "minLength": 0,
          "type": "string"
        }
      }
    }
  },
  "externalDocs": {
    "description": "Request API access",
    "url": "https://forms.office.com/r/RpN2hRmJD3"
  },
  "x-servers": [
    {
      "url": "https://api.re-leased.com/",
      "description": "Production Environment"
    }
  ]
}