{
  "openapi": "3.0.4",
  "info": {
    "title": "OnboardMe External API",
    "description": "Partner integration API for OnboardMe. All routes are under `/api/v1/…` on your **regional** API host.\r\n\r\n---\r\n\r\n## Regional base URLs\r\n\r\nUse the host that matches where the practice is hosted (a practice is tied to one region).\r\n\r\n| Region | Base URL |\r\n| ------ | -------- |\r\n| Australia & New Zealand | `https://anzapi.onboardme.app` |\r\n| United Kingdom | `https://ukapi.onboardme.app` |\r\n| South Africa | `https://zaapi.onboardme.app` |\r\n\r\nIn your HTTP client, pick the matching **Server** / base URL (or set `baseUrl` to one of the URLs above).\r\n\r\nExample: `GET https://ukapi.onboardme.app/api/v1/auth/validate`\r\n\r\n---\r\n\r\n## Authentication\r\n\r\n**Production integrations (recommended):** send both headers on every request:\r\n\r\n- **`X-OM-Auth-ID`** — Client ID (GUID from OnboardMe practice settings)\r\n- **`X-OM-Auth-Key`** — Client secret paired with that Client ID\r\n\r\n**Postman / Swagger Try it out:** use **Authorize** (HTTP Basic) with **Client ID** as the username and **Client secret** as the password. In Postman, set Basic Auth **once on the collection** so every request inherits it — you do not need auth on each request or two separate header fields.\r\n\r\nHTTPS only. Credentials are scoped to one practice; this API does not use end-user passwords.\r\n\r\n---\r\n\r\n## Partner onboarding\r\n\r\n1. Obtain **Client ID** and **secret** from the practice administrator (OnboardMe).\r\n2. Select the **correct regional base URL** (ANZ, UK, or ZA); practices do not span regions.\r\n3. Call `GET /api/v1/auth/validate` to confirm access and read `canWrite` before using any write endpoint.\r\n4. Run an initial **full** import, then use `lastUpdated` on list endpoints for **incremental** sync.\r\n5. On **429 Too Many Requests**, honour `Retry-After` and backoff; avoid polling faster than you need.\r\n\r\n---\r\n\r\n## Pagination and sync\r\n\r\nList endpoints support optional `pageNumber` (1-based, up to 10000) and `lastUpdated` (UTC). Use `lastUpdated` for incremental sync: only rows changed on or after that instant. `lastUpdated` must not be in the future.\r\n\r\n---\r\n\r\n## Rate limits\r\n\r\nPer Client ID (default: 60/minute, 1000/hour, 10000/day). **429** responses include JSON details and headers: `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`.\r\n\r\n---\r\n\r\n## Write access\r\n\r\nCreating or updating data requires `canWrite: true` from `/api/v1/auth/validate`. Read-only clients get **403** on write routes.\r\n\r\nLead endpoints under **`/api/v1/leads`** support listing, detail, notes, create, and **convert-to-client** (promote a lead to an Active client).\r\n\r\n**Contacts** (`/api/v1/contacts/list` and `/api/v1/entities/{entityKey}/contacts`) expose people linked to clients — list, create, and update.\r\n\r\n**ID verifications** — **`POST /api/v1/id-verifications/send`** starts identity verification (optionally with AML via **`includeAml`**). **`POST /api/v1/id-verifications/aml-checks`** runs a standalone **standard** or **extensive** AML screening on an existing client (`entityKey`). Download a verification certificate PDF with **`GET /api/v1/id-verifications/entities/{entityKey}/certificate`**.\r\n\r\n**Onboarding documents** — **`GET /api/v1/onboardings/{key}/documents`** lists requirements per client entity (`isUploaded` / `isBypassed`). Download one file via a short-lived signed S3 URL: **`GET …/entities/{entityOnboardingId}/documents/{documentId}`**. Download all uploaded files as a zip: **`GET …/entities/{entityOnboardingId}/documents/zip`**.\r\n\r\n**Bills** — **`GET /api/v1/bills/list`** lists invoices by **bill date** range (`startDate` / `endDate`). **`GET /api/v1/bills/{billingId}`** returns detail including ledger fields (`externalId`, `externalNumber`, `externalUrl`). **`GET /api/v1/bills/{billingId}/pdf`** downloads the OnboardMe invoice PDF. **`POST /api/v1/bills`** creates an **adhoc** bill for an Active client entity only (no engagement / onboarding entity link; requires `canWrite`; does **not** push to Xero — stores `sendBill` / `syncNow`). When Xero is connected, lines need a revenue account (`extAccountID`) or sale item plus tax (`extTaxID`); use **`GET /api/v1/bills/ledger/status|accounts|tax-rates|branding-themes`**.\r\n\r\n**Proposals** — List a client's proposals with **`GET /api/v1/proposals/list?entityKey=`**. Load previous **services, invoices, recurring billings, and jobs** via **`GET /api/v1/proposals/{key}/pricing`** (or full **`GET /api/v1/proposals/{key}`**). **`POST /api/v1/proposals/{key}/duplicate`** copies pricing, billings, and jobs into a new draft. **`POST /api/v1/proposals/{key}/renew`** does the same and marks the original Renewed (**`GET …/renew-preview`** first for signatory choice). **`POST /api/v1/proposals/from-template`** creates from a saved template. **`POST /api/v1/proposals`** creates an **adhoc** proposal with caller-supplied **services**, optional **XPM jobs**, **FYI jobs**, and **billings**. Catalogs: **`GET /api/v1/proposals/services`**, **`…/xpm-job-templates`**, **`…/xpm-job-categories`**, **`…/xpm-staff`**, **`…/fyi-job-templates`**, **`…/fyi-job-states`**.\r\n\r\n**Recurring billing** — **`GET /api/v1/recurring-billing/list`**, **`GET /api/v1/recurring-billing/{recurringBillingId}`**, and **`GET …/runs`** for schedule list, detail, and generated-run history. Ledger invoice numbers/URLs appear on generated bills, not on the schedule itself.\r\n\r\n---\r\n\r\n## Outbound webhooks\r\n\r\nRegister a subscriber URL with **`POST /api/v1/webhooks`** (requires `canWrite`). Supported event keys are listed at **`GET /api/v1/webhooks/events`** (e.g. `proposal.accepted`, `eform.submitted`). One subscription per event; repeat subscribe with the same URL for multiple events.\r\n\r\n**Subscribe response (`201`):** `{ \"id\", \"webhookSecret\" }` — store `webhookSecret` immediately; it is **not** returned again on list/load.\r\n\r\n**Deliveries:** OnboardMe `POST`s JSON to your URL. Each request includes:\r\n\r\n| Header | Description |\r\n| ------ | ------------- |\r\n| `X-Om-Event` | Event key (e.g. `proposal.accepted`) |\r\n| `X-Om-Event-Id` | Unique idempotency key for this event |\r\n| `X-Om-Timestamp` | Unix time (seconds, UTC) used when signing |\r\n| `X-Om-Signature` | `sha256=<hex>` HMAC (see below) |\r\n\r\n**Signature verification (recommended on your server):**\r\n\r\n1. Read the **raw** request body bytes (do not re-serialize JSON).\r\n2. Build `canonical = {X-Om-Timestamp} + \".\" + {rawBody}`.\r\n3. Compute `expected = \"sha256=\" + HMAC_SHA256_UTF8(webhookSecret, canonical)` (hex **lowercase**).\r\n4. Compare `expected` to `X-Om-Signature` using a constant-time comparison; reject on mismatch.\r\n\r\nThe delivery JSON schema is documented as **`ApiWebhookDeliveryEventDTO`** in Schemas (see **Webhooks** operations). Test deliveries: **`POST /api/v1/webhooks/{id}/test`**.\r\n\r\n---\r\n\r\n## Errors\r\n\r\n- **400** — validation (`message` in body).\r\n- **401** — bad or missing credentials.\r\n- **404** — resource not in the practice (`message`).\r\n\r\nSchemas below include **illustrative** example values; live responses use your data.",
    "contact": {
      "name": "OnboardMe Support",
      "email": "support@onboardme.app"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://anzapi.onboardme.app",
      "description": "Australia & New Zealand — ANZ-hosted practices"
    },
    {
      "url": "https://ukapi.onboardme.app",
      "description": "United Kingdom — UK-hosted practices"
    },
    {
      "url": "https://zaapi.onboardme.app",
      "description": "South Africa — ZA-hosted practices"
    }
  ],
  "paths": {
    "/api/v1/auth/validate": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Validate API credentials",
        "description": "Confirms that your Client ID and secret are accepted and returns basic facts about this integration.\r\n\r\n**When to use:** During setup, monitoring, or troubleshooting—not on every downstream API call.\r\n\r\n**200:** `authenticated`, human-readable `message`, `clientID`, `clientName`, `canWrite` (whether POST/create routes are allowed), and `timestamp` (UTC).\r\n\r\n**401:** Missing/invalid credentials, or the API client is inactive.\r\n\r\n**429:** Rate limit exceeded (see API overview for rate-limit headers).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": { }
              },
              "application/json": {
                "schema": { }
              },
              "text/json": {
                "schema": { }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/bills/list": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List bills",
        "description": "Returns bills (invoices) for your practice within a **bill date** range.\r\n\r\nUnlike most list endpoints, this uses **`startDate`** / **`endDate`** (not `lastUpdated`).\r\n\r\nOptional filters: `searchFilter`, `invoiceStatus` (`Paid`, `Unpaid`, `Partially Paid`, `Overpaid`, `Cancelled`), `billNowFilter` (`0` neither, `1` upfront, `2` on completion), `pageNumber` (1-based).\r\n\r\nEach row includes ledger sync fields when present: `externalId`, `externalNumber`, `externalUrl`.\r\n\r\n**400:** Missing/invalid dates or `pageNumber`.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "description": "Inclusive start of bill-date range (required).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Inclusive end of bill-date range (required).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "searchFilter",
            "in": "query",
            "description": "Free-text search across common bill fields.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000). Default 1.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "invoiceStatus",
            "in": "query",
            "description": "Paid | Unpaid | Partially Paid | Overpaid | Cancelled.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billNowFilter",
            "in": "query",
            "description": "0 = neither, 1 = upfront, 2 = on completion.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillListDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/bills/ledger/status": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "Ledger connection status",
        "description": "Returns whether the practice is connected to **Xero** (XpmBlue).\r\n\r\nUse this before create to know whether line items must include `extAccountID`/`extItemID` and `extTaxID`.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerStatusDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerStatusDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerStatusDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/bills/ledger/accounts": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List Xero revenue accounts",
        "description": "Returns synced Xero chart-of-accounts rows for the practice (`extAccountID` = local id for create).\r\n\r\nEmpty when Xero is not connected. Prefer accounts with class **REVENUE** for invoice lines.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerAccountDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerAccountDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerAccountDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/bills/ledger/tax-rates": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List Xero tax rates",
        "description": "Returns selected practice tax rates for Xero invoice lines.\r\n\r\nUse `extTaxID` on create line items (practice tax option id). Empty when Xero is not connected.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerTaxRateDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerTaxRateDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerTaxRateDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/bills/ledger/branding-themes": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List Xero branding themes",
        "description": "Returns Xero branding themes for the practice. Use `themeID` (GUID string) as `brandingThemeID` on create.\r\n\r\nEmpty when Xero is not connected.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerBrandingThemeDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerBrandingThemeDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerBrandingThemeDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/bills": {
      "post": {
        "tags": [
          "Bills"
        ],
        "summary": "Create a bill",
        "description": "Creates an **adhoc** bill for a real **Active** client entity. Requires **write** access.\r\n\r\nBills are **not** linked to proposals/engagements and **not** linked to onboarding entities.\r\n`entityKey` must come from **GET `/api/v1/entities`** (Active client only — not a lead).\r\n\r\n**Does not** push to Xero. Flags `sendBill` and `syncNow` are stored for later ledger sync / email behaviour.\r\n\r\nAmounts are **tax-exclusive**: each line needs `amount` plus either `taxAmount` or `taxPercent` (server computes tax). Header totals are summed from lines.\r\n\r\nWhen Xero is connected (`GET /api/v1/bills/ledger/status`):\r\n- each line needs `extAccountID` **or** `extItemID`\r\n- each line needs `extTaxID`, or a `taxPercent` that matches a selected tax rate (±0.02%)\r\n- use catalog endpoints under `/api/v1/bills/ledger/…`\r\n\r\n**201:** Created bill detail (same shape as load).\r\n\r\n**403:** API client is read-only.\r\n\r\n**404:** Entity not found.\r\n\r\n**429:** Rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.BillCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.BillCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.BillCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.BillDetailDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.BillDetailDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.BillDetailDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/bills/{billingId}": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "Load a bill",
        "description": "Returns a single bill with line items and ledger sync fields (`externalId`, `externalNumber`, `externalUrl`).\r\n\r\n`invoiceStatus` is computed from cancel state and payment totals (same values as list).\r\n\r\n**404:** Unknown `billingId` or bill outside your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "billingId",
            "in": "path",
            "description": "Bill id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.BillDetailDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.BillDetailDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.BillDetailDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/bills/{billingId}/pdf": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "Download bill PDF",
        "description": "Returns the OnboardMe-generated invoice **PDF** for the given bill (`application/pdf`).\r\n\r\nSame layout as the in-app invoice download (practice branding, logo, optional pay link when configured).\r\n\r\n**404:** Unknown `billingId`, bill outside your practice, or PDF could not be produced.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "billingId",
            "in": "path",
            "description": "Bill id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/contacts/list": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "List client contacts",
        "description": "Returns contacts linked to clients in your practice. Each row is an **entity contact** — a person tied to one client (`entityKey`).\r\n\r\nUse `lastUpdated` for incremental sync and `pageNumber` for paged exports (1-based, up to 10000).\r\n\r\nOptional `entityKey` limits results to one client. By default, soft-deleted contacts are excluded; set `includeDeleted=true` to include them.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "lastUpdated",
            "in": "query",
            "description": "Only contacts changed on or after this UTC time (incremental sync).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "entityKey",
            "in": "query",
            "description": "When set, only contacts for this client entity key.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "description": "When true, includes soft-deleted contacts.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactListDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/entities/{entityKey}/contacts": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "List contacts for a client",
        "description": "Returns all contacts linked to one client, identified by **`entityKey`**.\r\n\r\nPrimary contacts appear first. Deleted contacts are omitted unless `includeDeleted=true`.\r\n\r\n**404:** Client not found for your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "path",
            "description": "Client entity key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "description": "When true, includes soft-deleted contacts.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactListDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Add a contact to a client",
        "description": "Links a contact to a client, or creates a new practice contact and links it.\r\n\r\nRequires an API client with **write** access (`canWrite` from `/api/v1/auth/validate`).\r\n\r\n**Create new contact** — supply `contactName`, `contactSurname`, and `email` (and optional phone fields, `position`, `isPrimary`).\r\n\r\n**Link existing contact** — supply `contactID` from another client link or your CRM mapping. Name/email are taken from the existing contact record.\r\n\r\nIf a new contact matches an existing practice contact by name + surname + email, that record is reused (`matchedExistingContact: true` in the response).\r\n\r\n**201:** Body includes `entityContactID` and `contactID`.\r\n\r\n**403:** API client is read-only.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "path",
            "description": "Client entity key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactCreateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactCreateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactCreateResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/entities/{entityKey}/contacts/{entityContactId}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Get a client contact",
        "description": "Returns one entity contact for the given client and **`entityContactID`**.\r\n\r\n**404:** Client or contact not found for your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "path",
            "description": "Client entity key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityContactId",
            "in": "path",
            "description": "Entity contact link ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactListDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactListDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactListDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "put": {
        "tags": [
          "Contacts"
        ],
        "summary": "Update a client contact",
        "description": "Updates contact details and the client link (position, primary flag).\r\n\r\nSet **`isDeleted`: true** to soft-delete the contact (same as in the app).\r\n\r\nRequires an API client with **write** access.\r\n\r\n**404:** Client or contact not found for your practice.\r\n\r\n**403:** API client is read-only.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "path",
            "description": "Client entity key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityContactId",
            "in": "path",
            "description": "Entity contact link ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityContactUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/deals/list": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "List deals",
        "description": "Returns deals for your practice.\r\n\r\nUse `lastUpdated` for incremental sync and `pageNumber` for paged exports (1-based, up to 10000).\r\n\r\nOptional filters: `name`, `status`, `source` (substring), `entityKey`, `groupCode`.\r\n\r\nBy default, deals with status **Lost** are excluded. Set `includeLostDeals=true` to include them.\r\n\r\nStatus/source **`name`** values come from **GET `/api/v1/settings/deal-statuses`** and **deal-sources**.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "lastUpdated",
            "in": "query",
            "description": "Only deals changed on or after this UTC time (incremental sync).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Substring match on deal name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Substring match on status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "description": "Substring match on source.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityKey",
            "in": "query",
            "description": "Filter to deals for this client entity key.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "groupCode",
            "in": "query",
            "description": "Filter to deals for this group code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeLostDeals",
            "in": "query",
            "description": "When true, includes deals with status Lost.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.DealListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.DealListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.DealListDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/deals/{dealId}": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "Get a deal",
        "description": "Returns one deal by **`dealId`**.\r\n\r\n**404:** Deal not found for your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "description": "Deal id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DealDetailDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DealDetailDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DealDetailDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "put": {
        "tags": [
          "Deals"
        ],
        "summary": "Update a deal",
        "description": "Updates deal fields. Only supplied fields are changed.\r\n\r\nSet **`status`: `\"Lost\"`** to close the deal in the pipeline (list excludes Lost by default).\r\n\r\nTo retarget the client, supply either `entityKey` or `groupCode` (exactly one).\r\n\r\nRequires **write** access.\r\n\r\n**404:** Deal not found for your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "description": "Deal id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.DealUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.DealUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.DealUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Deals"
        ],
        "summary": "Delete a deal",
        "description": "Permanently deletes the deal and its notes for your practice.\r\n\r\nRequires **write** access. Prefer setting status to **Lost** via PUT when you only need to close the pipeline.\r\n\r\n**404:** Deal not found for your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "description": "Deal id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/deals/{dealId}/notes": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "List deal notes",
        "description": "Returns notes for a deal (20 per page, newest first).\r\n\r\n**404:** Deal not found for your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "description": "Deal id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.DealNoteListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.DealNoteListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.DealNoteListDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "post": {
        "tags": [
          "Deals"
        ],
        "summary": "Add a note to a deal",
        "description": "Adds a note. Both **`noteText`** and **`noteType`** (subject) are required.\r\n\r\nRequires **write** access.\r\n\r\n**404:** Deal not found for your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "description": "Deal id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.DealNoteCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.DealNoteCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.DealNoteCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DealNoteCreateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DealNoteCreateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DealNoteCreateResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/deals": {
      "post": {
        "tags": [
          "Deals"
        ],
        "summary": "Create a deal",
        "description": "Creates a new deal linked to exactly one **client** (`entityKey`) or **group** (`groupCode`).\r\n\r\nRequires an API client with **write** access.\r\n\r\n- Deals require an **Active** client entity (not a lead). Use **GET `/api/v1/entities`**.\r\n- `status` / `source`: use **`name`** from **GET `/api/v1/settings/deal-statuses`** and **deal-sources**.\r\n- Optional `noteText` + `noteType` create an initial note.\r\n\r\n**Example**\r\n\r\n```json\r\n{\r\n  \"name\": \"FY26 Tax engagement\",\r\n  \"entityKey\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\r\n  \"status\": \"Open\",\r\n  \"source\": \"Referral\",\r\n  \"value\": 4500.00\r\n}\r\n```\r\n\r\n**201:** Body includes `dealID`.\r\n\r\n**403:** API client is read-only.\r\n\r\n**429:** Rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.DealCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.DealCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.DealCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DealCreateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DealCreateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DealCreateResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/eforms/templates": {
      "get": {
        "tags": [
          "eForms"
        ],
        "summary": "List eForm templates",
        "description": "Returns **eForm templates** available to your practice (industry defaults and practice-specific templates).\r\n\r\n**Paging**\r\n\r\n- `pageNumber`: 1-based page index (default **1**).\r\n- `pageSize`: rows per page (default **50**, maximum **100**).\r\n\r\n**`includeInactive`:** when **true**, inactive templates are included; default is active only.\r\n\r\n**`search`:** optional partial match on template name.\r\n\r\n**400:** Invalid `pageNumber` or `pageSize`.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000). Omit for page 1.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Page size (1–100). Omit for 50.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeInactive",
            "in": "query",
            "description": "When true, includes inactive templates.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Filter template names (contains match).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.FormTemplatesListResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.FormTemplatesListResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.FormTemplatesListResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/eforms/send": {
      "post": {
        "tags": [
          "eForms"
        ],
        "summary": "Create and send an eForm from a template",
        "description": "Creates an eForm from a **template** (`templateId` from `GET /api/v1/eforms/templates`), then sends the invitation email.\r\n\r\n**Recipient**\r\n\r\n- **`entityKey`** — reference an existing client. You may override **`recipientName`**, **`recipientEmail`**, or **`recipientMobile`** for this send only.\r\n- Omit **`entityKey`** and supply **`recipientName`** and **`recipientEmail`** (and optionally **`recipientMobile`**) for a recipient not tied to a stored client (`entityId` is left unset).\r\n\r\n**`mute`** — when **true**, no email is sent; the form is still marked as sent and **`accessUrl`** is the same client link as when the email would have been sent (compare ID verification mute).\r\n\r\nIf the send step fails (for example mail delivery), the form is **left as a draft** and **`sent`** is **false**; **`accessUrl`** is then a portal URL to open the form in the editor.\r\n\r\nInsufficient subscription or wallet balance returns **400** (no charge). Write access is required.\r\n\r\n**429** — rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormSendRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormSendRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormSendRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormSendResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormSendResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormSendResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/entities/list": {
      "get": {
        "tags": [
          "Entities"
        ],
        "summary": "List client entities",
        "description": "Returns clients (entities) for the practice—typically companies and individuals you onboard.\r\n\r\nUse `lastUpdated` for incremental sync and `pageNumber` for paged exports (1-based, up to 10000).\r\n\r\nOptional `name`, `otherName`, `surname`, and `email` query parameters apply case-insensitive substring filters (AND together when more than one is set).\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "lastUpdated",
            "in": "query",
            "description": "Only entities changed on or after this UTC time (incremental sync).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Substring match on entity first/given name (`afEntityName`).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "otherName",
            "in": "query",
            "description": "Substring match on other/trading name (`afOtherName`).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "surname",
            "in": "query",
            "description": "Substring match on surname (`afEntitySurname`).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "description": "Substring match on email (`afEntityEmail`).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityListDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/entities/{key}": {
      "get": {
        "tags": [
          "Entities"
        ],
        "summary": "Get entity by key",
        "description": "Returns full detail for one client entity, including contact fields, addresses where configured, custom field values, and identity verification summary when present.\r\n\r\n**`customFields`** — populated custom field values for the client (active field definitions only). Each item includes `customFieldId`, `name`, `type`, stored `value`, and `displayValue` (human-readable; e.g. checkbox Yes/No, user list names, dates as `yyyy-MM-dd`).\r\n\r\n**`verification`** — requested verification method (from linked onboarding client when applicable), verification outcome, status, integration check IDs, and document reference fields.\r\n\r\n**404:** Unknown key or entity not in your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Client entity key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Entity detail including custom fields when set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityDetailDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/entities/{key}/integrations": {
      "get": {
        "tags": [
          "Entities"
        ],
        "summary": "Get linked integration IDs for an entity",
        "description": "Returns external system identifiers (for example tax, practice management, or CRM IDs) linked to this client.\r\n\r\nUse the client’s **`entityKey`** from list or detail responses to correlate records in your systems.\r\n\r\n**404:** Entity not found for your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Client entity key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityIntegrationIdsDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityIntegrationIdsDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityIntegrationIdsDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/entities": {
      "post": {
        "tags": [
          "Entities"
        ],
        "summary": "Create a client entity",
        "description": "Creates a new client (entity) in the practice. Requires an API client with **write** access (`canWrite` from `/api/v1/auth/validate`).\r\n\r\n**Body fields (common)**\r\n\r\n- `entityTypeID`: numeric id (see `/api/v1/settings/entity-types`). Ignored when `entityType` is set.\r\n- `entityType`: optional **code or display name** for the practice’s country (e.g. `Company`, `CO`, `Trust`) — resolved to `entityTypeID` automatically.\r\n- `clientStatus`: typically `\"Lead\"` or `\"Active\"`.\r\n- `entityName`, `entitySurname`, `entityInitials`: naming depends on entity type.\r\n- `externalSystemID` (optional): your system's identifier for this client; stored on the entity and returned on list/load.\r\n- `email`, `telephone`, `mobile`, `taxNumber`, `regNumber`, `idNumber`, etc.: optional identifiers.\r\n- `physicalAddress` / `postalAddress`: optional nested address objects (`address1`…`country`).\r\n\r\n**Example**\r\n\r\n```json\r\n{\r\n  \"entityType\": \"Company\",\r\n  \"clientStatus\": \"Lead\",\r\n  \"entityName\": \"Acme Holdings Pty Ltd\",\r\n  \"email\": \"accounts@partner.example\",\r\n  \"physicalAddress\": {\r\n    \"address1\": \"100 Queen St\",\r\n    \"city\": \"Melbourne\",\r\n    \"state\": \"VIC\",\r\n    \"postcode\": \"3000\",\r\n    \"country\": \"AU\"\r\n  }\r\n}\r\n```\r\n\r\n**201:** `Location` references the new entity; body includes `entityKey`.\r\n\r\n**403:** API client is read-only.\r\n\r\n**429:** Rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": { }
              },
              "application/json": {
                "schema": { }
              },
              "text/json": {
                "schema": { }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/groups/list": {
      "get": {
        "tags": [
          "Groups"
        ],
        "summary": "List groups",
        "description": "Returns client groups for your practice.\r\n\r\nUse `lastUpdated` for incremental sync and `pageNumber` for paged exports (1-based, up to 10000).\r\n\r\nOptional filters: `name` (substring), `groupCode` (exact), `isActive`.\r\n\r\nSet **`includeMembers=true`** to nest each group’s members. Members include **`entityKey`**\r\n(and name/email) so you can map to **GET `/api/v1/entities`**.\r\n\r\nStable public identifier for a group is **`groupCode`** (also used on deals).\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "lastUpdated",
            "in": "query",
            "description": "Only groups changed on or after this UTC time (incremental sync).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Substring match on group name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupCode",
            "in": "query",
            "description": "Exact match on group code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isActive",
            "in": "query",
            "description": "When set, only active or inactive groups.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "includeMembers",
            "in": "query",
            "description": "When true, each group includes a members array with entityKey.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiGroupListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiGroupListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiGroupListDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/id-verifications/send": {
      "post": {
        "tags": [
          "ID verifications"
        ],
        "summary": "Send an identity verification",
        "description": "Starts an identity verification and sends the recipient an email with a link to complete it, unless **`mute`** is **true** — then no email is sent and you use **`accessUrl`** from the response instead.\r\n\r\n**Who to verify**\r\n\r\n- **`entityKey`** — reference an existing client. You may override **`entityEmail`** or **`entityMobile`** for this invitation only.\r\n- Omit **`entityKey`** and supply **`entityName`**, **`entityEmail`**, and optionally **`entityMobile`** for someone not yet on file.\r\n\r\n**AML**\r\n\r\n- Omit **`includeAml`** for identity verification only.\r\n- Set **`includeAml`** to **`\"Basic\"`** or **`\"Extensive\"`** to include AML screening.\r\n\r\nFor a **standalone AML check** (no IDV invite), use **`POST /api/v1/id-verifications/aml-checks`**.\r\n\r\n**Cost (`wallet` in the response)**\r\n\r\n- **`wallet.identityVerificationFromWallet`** — amount taken from the **practice wallet** for the identity check itself (after promotions).\r\n- **`wallet.amlOnWalletBecausePoolEmpty`** — extra wallet charge for AML **only when** you included AML **and** the practice had **no subscription requests left** (then AML is billed like **one purchased request**). Otherwise **0** (AML used a pool request, no AML on the invite, or AML charges are waived).\r\n- **`wallet.totalWalletRequired`** — **`identityVerificationFromWallet` + `amlOnWalletBecausePoolEmpty`**. If the wallet is short and auto-topup is enabled, the practice wallet is topped up first; otherwise the send fails with **400** when balance is below this total.\r\n\r\nWrite access is required (**`canWrite: true`** from **`GET /api/v1/auth/validate`**).\r\n\r\n**429** — rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.IdVerificationSendRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.IdVerificationSendRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.IdVerificationSendRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.IdVerificationSendResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.IdVerificationSendResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.IdVerificationSendResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/id-verifications/entities/{entityKey}/certificate": {
      "get": {
        "tags": [
          "ID verifications"
        ],
        "summary": "Download identity verification certificate PDF",
        "description": "Returns the identity verification **certificate PDF** for an existing client (`entityKey`).\r\n\r\nSame certificate as Compliance / client identity verification export in the app. Generated on demand (not stored).\r\n\r\nAvailable when the client is **verified in person or manually**, or has an automated ComplyCube-style verification with check evidence (linked checks or identity/document/AML/multi-bureau check IDs). In-person certificates include AML screening checks that have been run for the client.\r\n\r\n**Response:** `application/pdf` with a `Content-Disposition` attachment filename.\r\n\r\n**400:** Certificate not available for this client’s verification method/state.\r\n\r\n**404:** Unknown entity key, or no verification record for the client.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "path",
            "description": "Client entity key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/id-verifications/aml-checks": {
      "post": {
        "tags": [
          "ID verifications"
        ],
        "summary": "Create an AML check for an existing entity",
        "description": "Starts a **standalone AML screening** for an existing client entity. Does **not** send an identity verification invite —\r\nuse **`POST /api/v1/id-verifications/send`** (with optional **`includeAml`**) when you need IDV with or without AML.\r\n\r\n**`entityKey`** — the client’s key from list/detail responses.\r\n\r\n**`checkType`**\r\n\r\n- **`\"standard\"`** — standard AML screening (sanctions / PEP level 1).\r\n- **`\"extensive\"`** — extensive AML screening (enhanced due diligence / PEP level 4, adverse media, exclusion lists).\r\n\r\n**`enableMonitoring`** (optional, default **false**) — continuous monitoring for the check.\r\n\r\nBilling uses the practice’s AML subscription pool first, then wallet add-request pricing for any shortfall (same as Compliance → New AML check). Billing runs **before** the check is created. If the wallet is short and auto-topup is enabled, the practice wallet is topped up first; otherwise insufficient requests/wallet returns **400** and no check is started. If billing succeeds but the provider check fails, the charge is refunded.\r\n\r\nWrite access is required (**`canWrite: true`** from **`GET /api/v1/auth/validate`**).\r\n\r\n**404** — entity not found for your practice.\r\n\r\n**429** — rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.AmlCheckCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.AmlCheckCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.AmlCheckCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.AmlCheckCreateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.AmlCheckCreateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.AmlCheckCreateResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/leads/list": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "List leads",
        "description": "Returns leads for your practice (clients with lead status).\r\n\r\nUse `lastUpdated` for incremental sync and `pageNumber` for paged exports (1-based, up to 10000).\r\n\r\nOptional filters: `name`, `email`, `leadStatus`, and `leadSource` apply case-insensitive substring matching.\r\n\r\nBy default, leads with status **Lost** are excluded. Set `includeLostLeads=true` to include them.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "lastUpdated",
            "in": "query",
            "description": "Only leads changed on or after this UTC time (incremental sync).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Substring match on lead name fields.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "description": "Substring match on email.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leadStatus",
            "in": "query",
            "description": "Substring match on lead status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leadSource",
            "in": "query",
            "description": "Substring match on lead source.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeLostLeads",
            "in": "query",
            "description": "When true, includes leads with status Lost.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadListDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/leads/{entityKey}": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "Get lead by entity key",
        "description": "Returns full detail for one lead, including contact fields and lead pipeline fields (source, status, value).\r\n\r\n**`entityKey`** is the stable identifier for the underlying client record.\r\n\r\n**404:** Unknown key, not a lead, or not in your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "path",
            "description": "Lead entity key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadDetailDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadDetailDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadDetailDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/leads/{entityKey}/notes": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "List notes for a lead",
        "description": "Returns lead notes for the given lead, newest first. Results are paged (20 per page).\r\n\r\n**404:** Lead not found for your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "path",
            "description": "Lead entity key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000).",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadNoteListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadNoteListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadNoteListDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Add a note to a lead",
        "description": "Adds a new note to an existing lead.\r\n\r\nRequires an API client with **write** access.\r\n\r\n**404:** Lead not found for your practice.\r\n\r\n**403:** API client is read-only.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "path",
            "description": "Lead entity key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadNoteCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadNoteCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadNoteCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadNoteCreateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadNoteCreateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadNoteCreateResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/leads": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Create a lead",
        "description": "Creates a new lead in the practice: a client entity with lead status, lead details, and optionally an initial note in one request.\r\n\r\nRequires an API client with **write** access (`canWrite` from `/api/v1/auth/validate`).\r\n\r\n**Body fields (common)**\r\n\r\n- `entityType` / `entityTypeID`: see `/api/v1/settings/entity-types`. Defaults to Individual when omitted.\r\n- **Naming (depends on entity type):**\r\n  - **Individual / Sole Trader:** `entityName` (required) = given/first name; `entitySurname` = family/last name. Optional `otherName`, `entityInitials`. Names are **not** split automatically — send both fields.\r\n  - **Company and other non-individual types:** `entityName` (required) = full legal or trading name; leave `entitySurname` unset.\r\n- `email`, `mobile`, `telephone`, addresses: optional contact fields.\r\n- `externalSystemID`: your system's identifier for this lead.\r\n- `leadSource`, `leadStatus`, `leadValue`: optional pipeline fields.\r\n  Use **`name`** values from **GET `/api/v1/settings/lead-sources`** and **GET `/api/v1/settings/lead-statuses`**.\r\n- `noteText` / `noteType`: optional initial lead note (`noteType` max 45 characters).\r\n\r\n**Example (individual)**\r\n\r\n```json\r\n{\r\n  \"entityType\": \"Individual\",\r\n  \"entityName\": \"Alex\",\r\n  \"entitySurname\": \"Morgan\",\r\n  \"email\": \"alex@example.com\",\r\n  \"leadSource\": \"Website enquiry\",\r\n  \"leadStatus\": \"New\"\r\n}\r\n```\r\n\r\n**201:** `Location` references the new lead; body includes `entityKey`, `leadDetailID`, and `leadNoteID` when a note was created.\r\n\r\n**403:** API client is read-only.\r\n\r\n**429:** Rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadCreateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadCreateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadCreateResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/leads/{entityKey}/convert-to-client": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Convert lead to client",
        "description": "Promotes a lead to an **Active** client by setting the underlying entity's client status from Lead to Active.\r\n\r\nThe same **`entityKey`** continues to identify the record; after conversion it appears in **`GET /api/v1/entities/list`** rather than lead list endpoints.\r\n\r\nRequires an API client with **write** access. Integration sync to connected practice-management systems runs in the background after conversion (same as updating a client in the app).\r\n\r\n**400:** Entity is already a client (not lead status).\r\n\r\n**404:** Lead not found for your practice.\r\n\r\n**403:** API client is read-only.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "path",
            "description": "Lead entity key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadConvertToClientResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadConvertToClientResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.LeadConvertToClientResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/onboardings/list": {
      "get": {
        "tags": [
          "Onboardings"
        ],
        "summary": "List onboardings",
        "description": "Returns onboarding jobs for your practice. Use `lastUpdated` for incremental sync and `searchFilter` for quick narrowing.\r\n\r\n**Query tips**\r\n\r\n- `statusID`: filter by onboarding status ID.\r\n- `searchFilter`: free-text search across key onboarding fields.\r\n- `pageNumber`: 1-based page (1–10000).\r\n- `userID`: filter by assigned user (see **GET `/api/v1/users/list`** for IDs).\r\n- `lastUpdated`: only rows changed on or after this UTC time (must not be in the future).\r\n- `excludeCompleted`: when true, completed onboardings are omitted.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "statusID",
            "in": "query",
            "description": "Filter by onboarding status ID.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "searchFilter",
            "in": "query",
            "description": "Case-insensitive search across key onboarding fields.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000). Omit for default paging.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userID",
            "in": "query",
            "description": "Restrict to onboardings assigned to this user ID.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lastUpdated",
            "in": "query",
            "description": "Return only items updated at or after this UTC time (incremental sync).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "excludeCompleted",
            "in": "query",
            "description": "When true, excludes completed onboardings.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingListDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}": {
      "get": {
        "tags": [
          "Onboardings"
        ],
        "summary": "Get onboarding by key",
        "description": "Returns full detail for one onboarding job, including clients, recipients, required documents, and per-client identity verification summary when present.\r\n\r\n**404:** Unknown key or onboarding not in your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Onboarding job key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDetailDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDetailDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDetailDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/onboardings/create": {
      "post": {
        "tags": [
          "Onboardings"
        ],
        "summary": "Create a client onboarding",
        "description": "Creates a **client onboarding** job with one **recipient** and one or more **clients** to onboard.\r\n\r\n**Request**\r\n\r\n- **`userKey`** — staff member creating/sending the job (**`userKey`** from **GET `/api/v1/users/list`**).\r\n- **`sendToRecipient`** — when **true**, the invitation is sent after creation using the same subscription, wallet, identity-verification, and AML billing rules as the main app. When **false**, the job is saved as a **draft** only.\r\n- **`recipient`** — single contact who receives the onboarding email (name, surname, email, optional mobile, optional SMS).\r\n- **`clients`** — one or more onboarding clients (same idea as the app’s client list on a new onboarding).\r\n\r\n  **Per client row (pick one path):**\r\n\r\n  1. **Existing CRM client** — set **`entityKey`** (from **GET `/api/v1/entities`**). Name/type come from the stored client; optional flags (`requireTaxDetails`, documents, ID check, etc.) apply on top.\r\n  2. **New quick-add client** — omit **`entityKey`**. Set **`entityTypeId`** *or* **`entityType`** (name/code from **GET `/api/v1/settings/entity-types`**, e.g. `\"Individual\"`, `\"Company\"`) plus **`name`** and **`surname`** when the type requires it.\r\n\r\n  **`clientCode`** (optional) — your practice client code (`entityCode` on CRM clients). Set on new quick-add rows; for **`entityKey`** clients the code usually comes from the stored client (you may override). Same field name as **GET `/api/v1/entities`** `entityCode`.\r\n\r\n  **Response:** `clients` is returned in the **same order** as the request. Each item includes `entityOnboardingId`, `entityKey`, and `clientCode`.\r\n- Per client flags: **`requireTaxDetails`**, **`requireDocuments`** (+ **`documents`** names), **`requestAccountingFileAccess`**.\r\n- **`identityVerification`** — when **true** on an Individual or Sole Trader, set **`verificationMethod`** to one of:\r\n\r\n  | `verificationMethod` | Description |\r\n  |---|---|\r\n  | **Basic** | Manual document collection (no automated ID check) |\r\n  | **Standard** | Identity verification only |\r\n  | **Enhanced** | Identity verification + basic AML |\r\n  | **Comprehensive** | Identity verification + extensive AML |\r\n  | **Annature Identity Only** | Annature identity only (`type=standard`) — requires Annature connected; legacy alias **Annature** |\r\n  | **Annature Identity + AML** | Annature identity + AML (`type=enhanced`) — requires Annature connected |\r\n\r\n  Required when **`identityVerification`** is **true**. Omit **`identityVerification`** or set it **false** to skip ID verification.\r\n\r\n**Billing (when `sendToRecipient` is true)**\r\n\r\nUses the same logic as **Send** in the main app: onboarding request units from subscription then wallet; identity verification and AML screening (Enhanced / Comprehensive) from wallet; SMS from wallet when **`sendSms`** is set. Promotional free-verification rules apply where configured.\r\n\r\nWhen **`sendToRecipient`** is **true**, subscription, wallet, identity-verification, AML, and SMS costs are **checked before** the onboarding is created. Insufficient funds return **400** and **nothing is persisted**. Other send failures after creation (e.g. misconfiguration) also return **400**; in those rare cases the onboarding may remain as a draft.\r\n\r\nWhen **`sendToRecipient`** is **false**, the job is saved as a draft only (no send attempted).\r\n\r\nWrite access is required (**`canWrite: true`** from **`GET /api/v1/auth/validate`**).\r\n\r\n**429** — rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingCreateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingCreateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingCreateResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/documents": {
      "get": {
        "tags": [
          "Onboardings"
        ],
        "summary": "List onboarding documents",
        "description": "Returns **all document requirements** for each client entity on the onboarding (same checklist as Notes & Docs in the app).\r\n\r\n**Per entity**\r\n\r\n- `entityKey`, `entityOnboardingId`, `name`, `surname`, `entityTypeName`\r\n- `documents` — array of requirement rows (soft-deleted rows are omitted)\r\n\r\n**Per document**\r\n\r\n| Field | Meaning |\r\n| ----- | ------- |\r\n| `documentId` | Use with the single-file download endpoint |\r\n| `documentRequested` | Requirement label (user-uploaded extras have the `USER_UPLOADED_` prefix stripped) |\r\n| `fileName` | Stored file name when uploaded; otherwise `null` |\r\n| `isUploaded` | `true` when a file is present |\r\n| `uploadedOn` | UTC upload time when uploaded |\r\n| `isBypassed` | `true` when staff bypassed the requirement |\r\n| `bypassReason` | Optional reason when bypassed |\r\n| `isUserUploaded` | `true` for general/extra uploads (not a named required doc) |\r\n\r\nStatus combinations: pending (`isUploaded` and `isBypassed` both false), uploaded, or bypassed. A row can be both uploaded and bypassed only if both flags are set in data.\r\n\r\n**Downloads**\r\n\r\n- Single file (signed S3 URL): **GET** `/api/v1/onboardings/{key}/entities/{entityOnboardingId}/documents/{documentId}` — only when `isUploaded` is true.\r\n- All files (zip via this API): **GET** `/api/v1/onboardings/{key}/entities/{entityOnboardingId}/documents/zip`.\r\n\r\n**404:** Unknown key or onboarding not in your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Onboarding job key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentsListDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentsListDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentsListDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/entities/{entityOnboardingId}/documents/zip": {
      "get": {
        "tags": [
          "Onboardings"
        ],
        "summary": "Download all onboarding documents as a zip",
        "description": "Builds a **zip** on the server of every uploaded file for one client entity on the onboarding\r\n(required-documents folder and general/user-uploaded folder). Same idea as “Download all documents” in the app.\r\n\r\nObtain `entityOnboardingId` from **GET** `/api/v1/onboardings/{key}/documents`.\r\n\r\nOnly **uploaded files** are included. Pending or bypassed-only requirements with no file are omitted.\r\n\r\n**Response:** `application/zip` with a `Content-Disposition` attachment filename\r\n(`ClientOnboarding_{entityOnboardingId}_docs_{yyyyMMddHHmmss}.zip`).\r\n\r\n**404:** Unknown onboarding/entity, or no uploaded files found.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Onboarding job key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityOnboardingId",
            "in": "path",
            "description": "Entity onboarding ID from the documents list.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/zip": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/zip": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/zip": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/entities/{entityOnboardingId}/documents/{documentId}": {
      "get": {
        "tags": [
          "Onboardings"
        ],
        "summary": "Get a signed download URL for one onboarding document",
        "description": "Returns a short-lived **signed S3 URL** for one uploaded document. Clients download the file **directly from S3**\r\n(HTTP GET on `url`) — file bytes do not pass through this API. Do not send OnboardMe API credentials to S3.\r\n\r\nObtain `entityOnboardingId` and `documentId` from **GET** `/api/v1/onboardings/{key}/documents`.\r\nOnly documents with `isUploaded: true` (and a stored `fileName`) can be downloaded.\r\n\r\n**Response body**\r\n\r\n| Field | Meaning |\r\n| ----- | ------- |\r\n| `url` | Presigned HTTPS GET URL |\r\n| `fileName` | Suggested download file name |\r\n| `expiresAt` | UTC expiry (URLs are valid for **15 minutes**) |\r\n\r\n**400:** Document exists but no file has been uploaded yet.\r\n\r\n**404:** Unknown onboarding/entity/document, or file missing in storage.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Onboarding job key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityOnboardingId",
            "in": "path",
            "description": "Entity onboarding ID from the documents list.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "description": "Document ID from the documents list.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentSignedUrlDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentSignedUrlDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentSignedUrlDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/practice/info": {
      "get": {
        "tags": [
          "Practice"
        ],
        "summary": "Get practice details",
        "description": "Returns display and configuration information for the practice tied to your API credentials (name, branding, regional settings, etc.).\r\n\r\n**401:** Invalid credentials.\r\n\r\n**404:** Practice information could not be loaded.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeInfoDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeInfoDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeInfoDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/practice/subscription": {
      "get": {
        "tags": [
          "Practice"
        ],
        "summary": "Get practice subscription",
        "description": "Returns the current subscription snapshot for the **practice tied to your API credentials**, using the same cached subscription layer as the main app. The response includes **`practiceKey`** (same source as `GET /api/v1/practice/info`).\r\n\r\n**401:** Invalid credentials.\r\n\r\n**404:** Practice information could not be loaded.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeSubscriptionDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeSubscriptionDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeSubscriptionDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/list": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List proposals",
        "description": "Returns proposal rows for your practice. Use **`entityKey`** to look up all proposals for one client (then **GET `/api/v1/proposals/{key}/pricing`** for services and billings, or **POST `/api/v1/proposals/{key}/duplicate`** to replicate).\r\n\r\n**Query tips**\r\n\r\n- `statusID`: filter by proposal status ID.\r\n- `entityKey`: limit to one client (same key as **GET `/api/v1/entities/{key}`**).\r\n- `searchFilter`: free-text search across common proposal fields.\r\n- `pageNumber`: 1-based page (omit to use the server default window).\r\n- `userID`: filter by user (see **GET `/api/v1/users/list`** for IDs).\r\n- `lastUpdated`: only rows changed on or after this UTC instant (must not be in the future).\r\n- `excludeCompleted`: when true, completed proposals are omitted.\r\n\r\n**400:** Invalid `pageNumber` or `lastUpdated`.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "statusID",
            "in": "query",
            "description": "Filter by proposal status ID.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "entityKey",
            "in": "query",
            "description": "If set, only proposals linked to this entity (client) key.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "searchFilter",
            "in": "query",
            "description": "Case-insensitive search across key proposal text fields.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000). Omit for default paging.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userID",
            "in": "query",
            "description": "Restrict to proposals associated with this user ID.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lastUpdated",
            "in": "query",
            "description": "Return only items updated at or after this UTC time (incremental sync).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "excludeCompleted",
            "in": "query",
            "description": "When true, excludes completed proposals from the result set.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementListDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/services": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List active proposal services",
        "description": "Returns all **active** proposal services for your practice (including industry defaults where applicable). Rows are ordered by name.\r\n\r\n**`parentServiceID`:** when set, this row is a **child** of the service whose **`serviceID`** equals that value. Top-level services omit it (`null`).\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementServiceListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementServiceListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementServiceListItemDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/packages": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List proposal packages",
        "description": "Returns **proposal packages** for your practice. Each package lists the **services** it includes, in display order.\r\n\r\n**`templateId`** identifies the package. Each **`services`** item matches the shape returned by **GET `/api/v1/proposals/services`**.\r\n\r\nPackages with no service lines return an empty **`services`** array.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPackageDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPackageDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPackageDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/templates": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List proposal templates",
        "description": "Returns **proposal templates** (engagement presets) saved for your practice. Use **`templateId`** from each row with **POST `/api/v1/proposals/from-template`**.\r\n\r\nThis is not the same as **GET `/api/v1/proposals/packages`**, which lists service **packages** and their line items.\r\n\r\n**Paging**\r\n\r\n- `pageNumber`: 1-based page index (default **1**).\r\n- `pageSize`: rows per page (default **50**, maximum **100**).\r\n\r\n**`includeInactive`:** when **true**, inactive templates are included; default is active only.\r\n\r\n**`search`:** optional partial match on template name.\r\n\r\n**400:** Invalid `pageNumber` or `pageSize`.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000). Omit for page 1.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Page size (1–100). Omit for 50.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeInactive",
            "in": "query",
            "description": "When true, includes inactive templates.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Filter template names (contains match).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementTemplatesListResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementTemplatesListResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementTemplatesListResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/xpm-job-templates": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List XPM job templates",
        "description": "Returns **Xero Practice Manager job templates** synced for your practice. Use **`templateUuid`** on **POST `/api/v1/proposals`** `xpmJobs`.\r\n\r\nReturns an empty list when XPM is not connected.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmJobTemplateListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmJobTemplateListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmJobTemplateListItemDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/xpm-job-categories": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List XPM job categories",
        "description": "Returns **Xero Practice Manager job categories**. Use **`categoryId`** (UUID) on **POST `/api/v1/proposals`** `xpmJobs`.\r\n\r\nReturns an empty list when XPM is not connected.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmJobCategoryListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmJobCategoryListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmJobCategoryListItemDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/xpm-staff": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List XPM staff",
        "description": "Returns **Xero Practice Manager staff** (UUID, name, email). Use **`partnerUuid`** / **`managerUuid`** on **POST `/api/v1/proposals`** `xpmJobs`.\r\n\r\nReturns an empty list when XPM is not connected.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmStaffListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmStaffListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmStaffListItemDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/fyi-job-templates": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List FYI job templates",
        "description": "Returns **FYI job templates** synced for your practice. Use **`fyiTemplateId`** on **POST `/api/v1/proposals`** `fyiJobs`.\r\n\r\nReturns an empty list when FYI is not connected.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFyiJobTemplateListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFyiJobTemplateListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFyiJobTemplateListItemDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/fyi-job-states": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List FYI job states",
        "description": "Returns **FYI job states** (e.g. Planned). Use **`state`** (the **`name`**) on **POST `/api/v1/proposals`** `fyiJobs`.\r\n\r\nReturns an empty list when FYI is not connected.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFyiJobStateListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFyiJobStateListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFyiJobStateListItemDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/{key}/pdf": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "Download proposal PDF",
        "description": "Returns the proposal as a **PDF** for the given **`key`**.\r\n\r\nBehaviour matches the in-app proposal download: if the practice already has a stored copy (for example after acceptance), that file is returned; otherwise a PDF is generated on demand from the current proposal data.\r\n\r\n**`key`** is the proposal identifier from **GET `/api/v1/proposals/list`** or **GET `/api/v1/proposals/{key}`**.\r\n\r\n**Response:** `application/pdf` with a `Content-Disposition` attachment filename.\r\n\r\n**404:** Unknown key, proposal outside your practice, or PDF could not be produced.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Proposal key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/pdf": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/{key}": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "Get proposal by key",
        "description": "Loads one proposal by **`key`**, including full detail: **services** (prices, quantities, packages), **invoices** / **recurringBillingSetups**, **xpmJobs**, **fyiJobs**, signatories, and clients.\r\n\r\nPrefer **GET `/api/v1/proposals/{key}/pricing`** when you only need previous pricing, billing, and jobs (smaller payload for replicate/duplicate).\r\n\r\n**`key`** is the proposal identifier returned by **GET `/api/v1/proposals/list`**.\r\n\r\n**404:** Unknown key or proposal outside your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Proposal key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.Engagements.DataObjects.EngagementDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.Engagements.DataObjects.EngagementDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.Engagements.DataObjects.EngagementDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/{key}/pricing": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "Get proposal pricing, billing, and jobs",
        "description": "Returns a **pricing snapshot** for one proposal: service lines (with computed `lineTotal` / `servicesTotal`), one-off **invoices** (with line items and `billNow`), **recurring billings**, and configured **XPM** / **FYI** jobs.\r\n\r\nUse this after **GET `/api/v1/proposals/list?entityKey=`** to inspect a client's previous pricing before **POST `/api/v1/proposals/{key}/duplicate`** or **POST `/api/v1/proposals/{key}/renew`**.\r\n\r\n**`billNow`:** `0` neither, `1` upfront, `2` on completion.\r\n\r\n**404:** Unknown key or proposal outside your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Proposal key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPricingSnapshotDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPricingSnapshotDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPricingSnapshotDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/{key}/renew-preview": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "Preview proposal renewal signatories",
        "description": "Compares **proposal signatories** with current **client contacts** before **POST `/api/v1/proposals/{key}/renew`**.\r\n\r\nWhen **`signatoriesDiffer`** is **true**, pass **`signatorySource`: `ClientContacts`** on renew to use the live contact list, or omit / use **`Proposal`** to keep the previous signatories.\r\n\r\n**404:** Unknown key or proposal outside your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Proposal key (identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalRenewPreviewResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalRenewPreviewResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalRenewPreviewResponseDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/{key}/duplicate": {
      "post": {
        "tags": [
          "Proposals"
        ],
        "summary": "Duplicate a proposal",
        "description": "Creates a **new draft** that copies the source proposal's **services and prices**, **billings** (invoices and recurring schedules), **XPM / FYI jobs**, packages, terms, and clients. Same behaviour as duplicate in the app. The original is left unchanged.\r\n\r\n**Request**\r\n\r\n- **`userKey`** — staff member creating the copy (**GET `/api/v1/users/list`**).\r\n- **`sendToClient`** — when **true**, send (or submit for approval) after the copy is saved. Default is draft only.\r\n\r\n**Response**\r\n\r\n- **`sourceEngagementKey`** — the proposal that was copied.\r\n- **`engagementKey`** — the new proposal (**GET `/api/v1/proposals/{key}`**).\r\n- **`sentToClient`** — **true** only when send succeeded.\r\n- **`sourceMarkedRenewed`** — always **false** on duplicate (use **POST `…/renew`** to mark the original Renewed).\r\n\r\nWrite access is required.\r\n\r\n**429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Source proposal key.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalDuplicateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalDuplicateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalDuplicateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCloneResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCloneResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCloneResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/{key}/renew": {
      "post": {
        "tags": [
          "Proposals"
        ],
        "summary": "Renew a proposal",
        "description": "Duplicates the proposal (same copy as **POST `…/duplicate`**: services, prices, billings, jobs) and **marks the original as Renewed**. Use this to roll a completed engagement into a new period.\r\n\r\nCall **GET `/api/v1/proposals/{key}/renew-preview`** first if you may want live client contacts as signatories.\r\n\r\n**Request**\r\n\r\n- **`userKey`** — staff member creating the renewal.\r\n- **`sendToClient`** — when **true**, send the new proposal after it is saved.\r\n- **`signatorySource`** — **`Proposal`** (default, copy previous signatories) or **`ClientContacts`** (build from current contacts).\r\n\r\n**Response** is the same shape as duplicate, with **`sourceMarkedRenewed`: true**.\r\n\r\nWrite access is required.\r\n\r\n**429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Source proposal key.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalRenewRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalRenewRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalRenewRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCloneResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCloneResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCloneResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals/from-template": {
      "post": {
        "tags": [
          "Proposals"
        ],
        "summary": "Create a proposal from a template",
        "description": "Creates a **proposal** for an existing client from a **proposal template** (engagement preset).\r\n\r\n**Request**\r\n\r\n- **`userKey`** — staff member creating/sending the proposal (**`userKey`** from **GET `/api/v1/users/list`**). Used for **`CreatedBy`**, **`SentBy`**, and related audit fields.\r\n- **`entityKey`** — client to receive the proposal (same key as **GET `/api/v1/entities/{key}`** and **GET `/api/v1/proposals/list`** `entityKey`).\r\n- **`templateId`** — from **GET `/api/v1/proposals/templates`** (`templateId` on each item). Not the service-package `templateId` from **GET `/api/v1/proposals/packages`**.\r\n- **`sendToClient`** — when **true**, the proposal is sent to the client after creation (or submitted for internal approval first when the template requires it). When **false**, the proposal is saved as a **draft** only.\r\n\r\n**Response**\r\n\r\n- **`engagementKey`** — use with **GET `/api/v1/proposals/{key}`** to load the proposal.\r\n- **`sentToClient`** — **true** when the proposal was sent (or sent for approval); **false** when left as a draft.\r\n\r\nThe client must have an email address (and resolvable signatories) for the build step to succeed.\r\n\r\nWhen **`sendToClient`** is **true** but sending fails (for example mail delivery or insufficient subscription or wallet balance), the proposal is **left as a draft** and **`sentToClient`** is **false**; **`engagementKey`** is still returned.\r\n\r\nWrite access is required (**`canWrite: true`** from **`GET /api/v1/auth/validate`**).\r\n\r\n**429** — rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementFromTemplateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementFromTemplateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementFromTemplateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementFromTemplateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementFromTemplateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementFromTemplateResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/proposals": {
      "post": {
        "tags": [
          "Proposals"
        ],
        "summary": "Create an adhoc proposal",
        "description": "Creates a **full proposal** for an existing client **without** a proposal template: services, one-off and recurring billing, payment-details collection, identity verification, and optional onboarding after acceptance.\r\n\r\n**Request**\r\n\r\n- **`userKey`** — staff member creating/sending the proposal (**`userKey`** from **GET `/api/v1/users/list`**).\r\n- **`entityKey`** — existing client (same key as **GET `/api/v1/entities/{key}`**).\r\n- **`name`** — proposal name (the client display name is appended).\r\n- **`sendToClient`** — when **true**, the proposal is sent after creation (or submitted for internal approval first when required). When **false**, it is saved as a **draft**.\r\n- **`services`** — at least one line. **`serviceID`** from **GET `/api/v1/proposals/services`**. Optional overrides: `quantity`, `price`, `taxAmount`, `packageNumber`, `isOptional`, `discountPerc`, `discountAmount`, `serviceDetail`.\r\n- **`xpmJobs`** — optional. Each job needs **`name`** and **`templateUuid`** from **GET `/api/v1/proposals/xpm-job-templates`**. Optional: `categoryId`, `partnerUuid` / `managerUuid`, dates, `description`, `refNo`, `budget`. XPM must be connected.\r\n- **`fyiJobs`** — optional. Each job needs **`jobName`**, **`managerEmail`**, **`partnerEmail`**. Optional **`fyiTemplateId`** and **`state`**. FYI Elite must be connected.\r\n- **`invoices`** — optional one-off proposal billings (not **POST `/api/v1/bills`**). Each invoice needs `billDate`, `dueDate`, and `lineItems` with `amount`, `narration`, and `taxAmount` or `taxPercent`. Optional ledger ids: `extAccountID`, `extItemID`, `extTaxID`. **`billNow`**: `0` neither, `1` upfront, `2` on completion.\r\n- **`recurringBillings`** — optional OnboardMe recurring schedules. Each needs **`frequency`** (`daily`, `weekly`, `fortnightly`, `monthly`, `quarterly`, `annually`), **`startDate`**, and `lineItems` (same shape as invoices). Optional: `endDate`, `nextRunDate` (defaults to `startDate`), `dueDays`, `billDetails`, `refNo`, `brandingThemeID`, `sendBill`, `packageNumber`. **`billNow`**: `0` neither or `2` on completion.\r\n- **`requestPaymentDetails`** — when **true**, collect payment method on acceptance. **`paymentDetailsType`**: `0` all (default), `1` card, `2` bank account.\r\n- **`identityVerification`** — when **true** (and **`onboarding`** is omitted), run IDV on the proposal client. Requires **`verificationMethod`**: `Basic`, `Standard`, `Enhanced`, `Comprehensive`, `Annature Identity Only`, or `Annature Identity + AML`. Individual / Sole Trader only.\r\n- **`identityPeople`** — optional extra people to verify. Existing person: **`entityKey`**. New person: **`name`**, **`surname`**, optional `email` / `mobile`. Each needs **`verificationMethod`**. **`includeEngagement`**: `false` (default) is IDV-only; `true` includes them on the engagement.\r\n- **`onboarding`** — optional. When present, creates onboarding to send **after acceptance**. **`clients`** uses the same shape as **POST `/api/v1/onboardings/create`** (existing `entityKey` or quick-add with type/name, plus `requireTaxDetails`, `identityVerification`, `requireDocuments` / `documents`, `requestAccountingFileAccess`). If `clients` is empty, the proposal client is added automatically. Optional **`recipients`**: `name`, `surname`, `email`, `mobile`, `sendSms`. Omit recipients to derive them from signatories / onboarding clients. Put IDV on **`onboarding.clients`** (or top-level **`identityVerification`**, which is copied onto the proposal client row).\r\n\r\nOptional header fields: `note`, `startDate`, `endDate`, `startOnAcceptance`, `currencyID`, `lengthID`, `terms`, `refNo`, `expiryDate`, `sendSms`.\r\n\r\n**Response**\r\n\r\n- **`engagementKey`** — use with **GET `/api/v1/proposals/{key}`**.\r\n- **`sentToClient`** — **true** when sent (or sent for approval); **false** when left as a draft.\r\n\r\nWhen **`sendToClient`** is **true** but sending fails, the proposal is **left as a draft** and **`sentToClient`** is **false**; **`engagementKey`** is still returned.\r\n\r\nWrite access is required (**`canWrite: true`** from **`GET /api/v1/auth/validate`**).\r\n\r\n**429** — rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementFromTemplateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementFromTemplateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementFromTemplateResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/recurring-billing/list": {
      "get": {
        "tags": [
          "Recurring Billing"
        ],
        "summary": "List recurring billing schedules",
        "description": "Returns recurring billing schedules for your practice.\r\n\r\nOptional filters: `searchFilter`, `isActive` (`-1` all, `0` inactive, `1` active; default **1**), `pageNumber` (1-based).\r\n\r\nSchedules do not carry ledger invoice numbers/URLs — those appear on generated bills (`GET /api/v1/bills/{billingId}`).\r\n\r\n**400:** Invalid `pageNumber`.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "searchFilter",
            "in": "query",
            "description": "Free-text search across common schedule fields.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isActive",
            "in": "query",
            "description": "-1 = all, 0 = inactive, 1 = active (default).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000). Default 1.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.RecurringBillingApiListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.RecurringBillingApiListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.RecurringBillingApiListDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/recurring-billing/{recurringBillingId}": {
      "get": {
        "tags": [
          "Recurring Billing"
        ],
        "summary": "Load a recurring billing schedule",
        "description": "Returns a recurring billing schedule with line items.\r\n\r\n**404:** Unknown `recurringBillingId` or schedule outside your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "recurringBillingId",
            "in": "path",
            "description": "Recurring billing schedule id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.RecurringBillingApiDetailDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.RecurringBillingApiDetailDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.RecurringBillingApiDetailDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/recurring-billing/{recurringBillingId}/runs": {
      "get": {
        "tags": [
          "Recurring Billing"
        ],
        "summary": "List recurring billing runs",
        "description": "Returns generated-run history for a recurring billing schedule (including linked `billingId` when a bill was created).\r\nEach run includes ledger sync fields when present: `externalId`, `externalNumber`, `externalUrl`, plus `paymentTotal` and `invoiceStatus`.\r\n\r\n**404:** Unknown `recurringBillingId` or schedule outside your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "recurringBillingId",
            "in": "path",
            "description": "Recurring billing schedule id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000). Default 1.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.RecurringBillingApiRunDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.RecurringBillingApiRunDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.RecurringBillingApiRunDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/settings/entity-types": {
      "get": {
        "tags": [
          "System Settings"
        ],
        "summary": "List entity types for the practice",
        "description": "Returns the practice’s configured entity (client) types—used when creating entities or mapping from your CRM.\r\n\r\nPair these IDs with `entityTypeID` on **POST `/api/v1/entities`**.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.EntityType.DataObjects.EntityTypeDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.EntityType.DataObjects.EntityTypeDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.EntityType.DataObjects.EntityTypeDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/settings/roles": {
      "get": {
        "tags": [
          "System Settings"
        ],
        "summary": "List assignable user roles",
        "description": "Returns roles that can be assigned when creating or updating practice users via the public API\r\n(`User`, `Admin`, `Owner`). Internal roles such as SuperUser are omitted.\r\n\r\nPair `id` with `roleId`, or `roleName` with the `roleName` field, on **POST `/api/v1/users`** and **PUT `/api/v1/users/{userKey}`**.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.Role.DataObjects.RoleDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.Role.DataObjects.RoleDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.Role.DataObjects.RoleDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/settings/lead-sources": {
      "get": {
        "tags": [
          "System Settings"
        ],
        "summary": "List lead sources for the practice",
        "description": "Returns active lead sources (system defaults plus any practice overrides).\r\n\r\nUse the **`name`** value for `leadSource` on **POST `/api/v1/leads`**. `label` is the display text.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeOptionListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeOptionListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeOptionListDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/settings/lead-statuses": {
      "get": {
        "tags": [
          "System Settings"
        ],
        "summary": "List lead statuses for the practice",
        "description": "Returns active lead statuses (system defaults plus any practice overrides).\r\n\r\nUse the **`name`** value for `leadStatus` on **POST `/api/v1/leads`**. `label` is the display text.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeOptionListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeOptionListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeOptionListDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/settings/deal-sources": {
      "get": {
        "tags": [
          "System Settings"
        ],
        "summary": "List deal sources for the practice",
        "description": "Returns active deal sources (system defaults plus any practice overrides).\r\n\r\nUse the **`name`** value when setting a deal’s source. `label` is the display text.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeOptionListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeOptionListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeOptionListDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/settings/deal-statuses": {
      "get": {
        "tags": [
          "System Settings"
        ],
        "summary": "List deal statuses for the practice",
        "description": "Returns active deal statuses (system defaults plus any practice overrides).\r\n\r\nUse the **`name`** value when setting a deal’s status. `label` is the display text.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeOptionListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeOptionListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeOptionListDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/users/list": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List practice users",
        "description": "Returns staff users for the practice so you can map user keys to your own directory or CRM.\r\n\r\nUse `lastUpdated` to pull only changes since a previous sync. `pageNumber` is 1-based (1–10000).\r\n\r\nEach row includes `inactive` (practice membership disabled flag).\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "lastUpdated",
            "in": "query",
            "description": "Only users changed on or after this UTC time (incremental sync).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page index (1–10000).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.UserListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.UserListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.UserListDTO"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/users/{userKey}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get a practice user",
        "description": "Returns one staff user for your practice by **`userKey`**.\r\n\r\n**404:** User not found for your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "userKey",
            "in": "path",
            "description": "User key (GUID identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.UserListDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.UserListDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.UserListDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update a practice user",
        "description": "Updates profile fields and/or practice role for a user identified by **`userKey`**.\r\n\r\nOnly supplied fields are changed. Role values come from **GET `/api/v1/settings/roles`**.\r\nSet **`inactive`: true** to disable the user for this practice\r\n(same as `POST …/disable`), or `false` to re-enable.\r\n\r\nRequires an API client with **write** access.\r\n\r\n**404:** User not found for your practice.\r\n\r\n**403:** API client is read-only.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "userKey",
            "in": "path",
            "description": "User key (GUID identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.UserUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.UserUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.UserUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/users": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Add a practice user",
        "description": "Creates a new staff user, or adds an existing OnboardMe account (matched by email) to your practice.\r\n\r\nRequires an API client with **write** access (`canWrite` from `/api/v1/auth/validate`).\r\n\r\nSupply **`roleName`** or **`roleId`** from **GET `/api/v1/settings/roles`** (typically `User` / `Admin` / `Owner`).\r\n\r\nA welcome / invite email is sent for new accounts (and when an existing account is newly linked to the practice).\r\nOptional `baseUrl` overrides the server `FrontendUrl` used in that email.\r\n\r\n**201:** Body includes `userKey`.\r\n\r\n**409:** User is already a member of this practice.\r\n\r\n**403:** API client is read-only.\r\n\r\n**429:** Rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.UserCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.UserCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.UserCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.UserCreateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.UserCreateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.UserCreateResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/users/{userKey}/disable": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Disable a practice user",
        "description": "Soft-disables the user for your practice (`inactive` on the practice membership).\r\nThe account is retained; they can be re-enabled via `PUT` with `inactive: false`.\r\n\r\nRequires an API client with **write** access.\r\n\r\n**404:** User not found for your practice.\r\n\r\n**403:** API client is read-only.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "userKey",
            "in": "path",
            "description": "User key (GUID identifier).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List outbound webhooks",
        "description": "Returns webhook subscriptions for the practice tied to your API credentials.\r\nSecrets are not included in the response.\r\n\r\n**401:** Invalid credentials.\r\n\r\n**429:** Rate limit exceeded.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiWebhookListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiWebhookListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiWebhookListItemDTO"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Subscribe (create) a webhook",
        "description": "Creates an outbound webhook subscription (for example a Zapier REST hook target URL).\r\nSupported `webhookEvent` values are listed at `GET /api/v1/webhooks/events` (e.g. `proposal.accepted`, `eform.submitted`). One subscription row per event; use the same URL twice for multiple events.\r\nRequest accepts either `hookUrl` or Zapier's `targetUrl`.\r\n\r\nOutbound deliveries include:\r\n- `X-Om-Event`\r\n- `X-Om-Event-Id`\r\n- `X-Om-Timestamp`\r\n- `X-Om-Signature` (`sha256=<hex>`) on every delivery using the `webhookSecret` returned at subscribe.\r\n\r\nSignature canonical string format:\r\n`X-Om-Timestamp + \".\" + rawRequestBody` signed with HMAC SHA256 using your `webhookSecret`.\r\n\r\nReturns **`id`** and **`webhookSecret`** for use with `DELETE /api/v1/webhooks/{id}` when unsubscribing.\r\nThe signing secret is shown **once** at creation; store it to verify `X-Om-Signature` on deliveries.\r\nA server-generated secret is always created (any `webhookSecret` in the request body is ignored).\r\n\r\n**401:** Invalid credentials.\r\n\r\n**403:** API client does not have write access.\r\n\r\n**429:** Rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiWebhookSubscribeRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiWebhookSubscribeRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiWebhookSubscribeRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiWebhookSubscribeResultDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiWebhookSubscribeResultDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiWebhookSubscribeResultDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/webhooks/events": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List supported webhook events",
        "description": "Returns event keys you may pass as `webhookEvent` when subscribing.\r\n\r\nSupported events include `proposal.accepted` (all required proposal signatures complete) and `eform.submitted` (client submits an eForm).\r\nSee schemas **`ApiWebhookDeliveryEventDTO`** and **`ApiWebhookDeliveryEFormEventDTO`** for delivery JSON bodies and the **Outbound webhooks** section in the API overview for `X-Om-Signature` verification.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/{id}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Send test webhook payload",
        "description": "Sends a one-off test payload to the subscribed webhook URL (same `X-Om-*` headers and `X-Om-Signature` as live deliveries).\r\nUseful during Zapier setup when waiting for a sample trigger event.\r\nLive payload shape: **`ApiWebhookDeliveryEventDTO`** or **`ApiWebhookDeliveryEFormEventDTO`** in Schemas (depends on subscribed event).\r\n\r\n**401:** Invalid credentials.\r\n**403:** API client does not have write access.\r\n**404:** Webhook id not found for this practice.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Webhook id returned from `POST /api/v1/webhooks`.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": { }
              },
              "application/json": {
                "schema": { }
              },
              "text/json": {
                "schema": { }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/api/v1/webhooks/{id}": {
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Unsubscribe (deactivate) a webhook",
        "description": "Marks the webhook as inactive (`afIsActive = 0`) for the practice tied to your API credentials.\r\nThe row is retained for history; repeat calls for the same id are ignored if already inactive.\r\n\r\n**401:** Invalid credentials.\r\n\r\n**403:** API client does not have write access.\r\n\r\n**404:** Webhook id not found for this practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Webhook id returned from `POST /api/v1/webhooks`.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": { }
              },
              "application/json": {
                "schema": { }
              },
              "text/json": {
                "schema": { }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Application.APIData.DataObjects.AmlCheckCreateRequestDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid"
          },
          "checkType": {
            "type": "string",
            "nullable": true
          },
          "enableMonitoring": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.AmlCheckCreateResponseDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid"
          },
          "checkType": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "complyCubeCheckId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiGroupListDTO": {
        "type": "object",
        "properties": {
          "groupID": {
            "type": "integer",
            "format": "int32"
          },
          "groupName": {
            "type": "string",
            "nullable": true
          },
          "groupCode": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "practiceOfficeID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiGroupMemberDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiGroupMemberDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "entityEmail": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiWebhookDeliveryAcceptedServiceDTO": { },
      "Application.APIData.DataObjects.ApiWebhookDeliveryBillingDTO": { },
      "Application.APIData.DataObjects.ApiWebhookDeliveryClientDTO": { },
      "Application.APIData.DataObjects.ApiWebhookDeliveryEFormEventDTO": { },
      "Application.APIData.DataObjects.ApiWebhookDeliveryEFormRecipientDTO": { },
      "Application.APIData.DataObjects.ApiWebhookDeliveryEventDTO": { },
      "Application.APIData.DataObjects.ApiWebhookDeliveryInvoiceDTO": { },
      "Application.APIData.DataObjects.ApiWebhookDeliveryRecurringBillingDTO": { },
      "Application.APIData.DataObjects.ApiWebhookDeliverySignerDTO": { },
      "Application.APIData.DataObjects.ApiWebhookListItemDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "webhookName": {
            "type": "string",
            "nullable": true
          },
          "webhookURL": {
            "type": "string",
            "nullable": true
          },
          "webhookEvent": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "lastFiredOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastStatusCode": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "retryCount": {
            "type": "integer",
            "format": "int32"
          },
          "nextRetryOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "disabledReason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiWebhookSubscribeRequestDTO": {
        "type": "object",
        "properties": {
          "hookUrl": {
            "type": "string",
            "nullable": true
          },
          "targetUrl": {
            "type": "string",
            "nullable": true
          },
          "webhookEvent": {
            "type": "string",
            "nullable": true
          },
          "webhookName": {
            "type": "string",
            "nullable": true
          },
          "webhookSecret": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiWebhookSubscribeResultDTO": { },
      "Application.APIData.DataObjects.BillCreateLineItemDTO": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "double"
          },
          "taxAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "taxPercent": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "total": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "narration": {
            "type": "string",
            "nullable": true
          },
          "extAccountID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "extItemID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "extTaxID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "orderID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "serviceID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.BillCreateRequestDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid"
          },
          "billDate": {
            "type": "string",
            "format": "date"
          },
          "dueDate": {
            "type": "string",
            "format": "date"
          },
          "billDetails": {
            "type": "string",
            "nullable": true
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "currencyID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "billNow": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "syncNow": {
            "type": "boolean",
            "nullable": true
          },
          "sendBill": {
            "type": "boolean",
            "nullable": true
          },
          "brandingThemeID": {
            "type": "string",
            "nullable": true
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.BillCreateLineItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "entityKey": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
          "billDate": "2026-07-18",
          "dueDate": "2026-08-01",
          "billDetails": "Advisory work — July",
          "sendBill": true,
          "syncNow": false,
          "lineItems": [
            {
              "amount": 1000,
              "taxPercent": 10,
              "narration": "Consulting",
              "extAccountID": 42,
              "extTaxID": 15
            }
          ]
        }
      },
      "Application.APIData.DataObjects.BillDetailDTO": {
        "type": "object",
        "properties": {
          "billingID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementName": {
            "type": "string",
            "nullable": true
          },
          "engagementStatusID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isEngagementFinalised": {
            "type": "boolean"
          },
          "entityID": {
            "type": "integer",
            "format": "int32"
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "billDate": {
            "type": "string",
            "format": "date"
          },
          "dueDate": {
            "type": "string",
            "format": "date"
          },
          "billNumber": {
            "type": "string",
            "nullable": true
          },
          "billAmount": {
            "type": "number",
            "format": "double"
          },
          "billTax": {
            "type": "number",
            "format": "double"
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "billDetails": {
            "type": "string",
            "nullable": true
          },
          "currencyID": {
            "type": "integer",
            "format": "int32"
          },
          "paymentTotal": {
            "type": "number",
            "format": "double"
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "billNow": {
            "type": "integer",
            "format": "int32"
          },
          "syncNow": {
            "type": "boolean"
          },
          "sendBill": {
            "type": "boolean"
          },
          "billPercent": {
            "type": "integer",
            "format": "int32"
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "invoiceStatus": {
            "type": "string",
            "nullable": true
          },
          "externalID": {
            "type": "string",
            "nullable": true
          },
          "externalNumber": {
            "type": "string",
            "nullable": true
          },
          "externalURL": {
            "type": "string",
            "nullable": true
          },
          "syncAttemptCount": {
            "type": "integer",
            "format": "int32"
          },
          "syncFailedReason": {
            "type": "string",
            "nullable": true
          },
          "brandingThemeID": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time"
          },
          "cancelledOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLineItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.BillLedgerAccountDTO": {
        "type": "object",
        "properties": {
          "extAccountID": {
            "type": "integer",
            "format": "int64"
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "class": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "taxType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.BillLedgerBrandingThemeDTO": {
        "type": "object",
        "properties": {
          "themeID": {
            "type": "string",
            "nullable": true
          },
          "themeName": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "monitoredForAutomatedPayments": {
            "type": "boolean"
          },
          "allowAutomatedPaymentEnrollment": {
            "type": "boolean"
          },
          "sendAutomatedReminders": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.BillLedgerStatusDTO": {
        "type": "object",
        "properties": {
          "xeroConnected": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.BillLedgerTaxRateDTO": {
        "type": "object",
        "properties": {
          "extTaxID": {
            "type": "integer",
            "format": "int32"
          },
          "taxName": {
            "type": "string",
            "nullable": true
          },
          "taxPercent": {
            "type": "number",
            "format": "double"
          },
          "taxType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.BillLineItemDTO": {
        "type": "object",
        "properties": {
          "billingDetailID": {
            "type": "integer",
            "format": "int32"
          },
          "billAmount": {
            "type": "number",
            "format": "double"
          },
          "billTax": {
            "type": "number",
            "format": "double"
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "narration": {
            "type": "string",
            "nullable": true
          },
          "extItemID": {
            "type": "integer",
            "format": "int32"
          },
          "extAccountID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "extTaxID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "fieldOne": {
            "type": "string",
            "nullable": true
          },
          "fieldTwo": {
            "type": "string",
            "nullable": true
          },
          "orderID": {
            "type": "integer",
            "format": "int32"
          },
          "serviceID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.BillListDTO": {
        "type": "object",
        "properties": {
          "billingID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementName": {
            "type": "string",
            "nullable": true
          },
          "engagementStatusID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isEngagementFinalised": {
            "type": "boolean"
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "billDate": {
            "type": "string",
            "format": "date"
          },
          "billNumber": {
            "type": "string",
            "nullable": true
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "billDetails": {
            "type": "string",
            "nullable": true
          },
          "paymentTotal": {
            "type": "number",
            "format": "double"
          },
          "currencyID": {
            "type": "integer",
            "format": "int32"
          },
          "entityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "invoiceStatus": {
            "type": "string",
            "nullable": true
          },
          "externalID": {
            "type": "string",
            "nullable": true
          },
          "externalNumber": {
            "type": "string",
            "nullable": true
          },
          "externalURL": {
            "type": "string",
            "nullable": true
          },
          "syncAttemptCount": {
            "type": "integer",
            "format": "int32"
          },
          "syncFailedReason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "billingID": 12001,
          "engagementID": 4501,
          "engagementName": "FY26 — Corporate tax",
          "clientName": "Acme Pty Ltd",
          "billDate": "2026-07-01",
          "billNumber": "0000001234",
          "billTotal": 1100,
          "paymentTotal": 0,
          "invoiceStatus": "Unpaid",
          "externalID": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
          "externalNumber": "INV-1001",
          "externalURL": "https://go.xero.com/AccountsReceivable/View.aspx?InvoiceID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
        }
      },
      "Application.APIData.DataObjects.DealCreateRequestDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "groupCode": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "noteText": {
            "type": "string",
            "nullable": true
          },
          "noteType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DealCreateResponseDTO": {
        "type": "object",
        "properties": {
          "dealID": {
            "type": "integer",
            "format": "int64"
          },
          "dealNoteID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DealDetailDTO": {
        "type": "object",
        "properties": {
          "dealID": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "entityEmail": {
            "type": "string",
            "nullable": true
          },
          "groupCode": {
            "type": "string",
            "nullable": true
          },
          "groupName": {
            "type": "string",
            "nullable": true
          },
          "updatedByName": {
            "type": "string",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DealListDTO": {
        "type": "object",
        "properties": {
          "dealID": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "entityEmail": {
            "type": "string",
            "nullable": true
          },
          "groupCode": {
            "type": "string",
            "nullable": true
          },
          "groupName": {
            "type": "string",
            "nullable": true
          },
          "updatedByName": {
            "type": "string",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DealNoteCreateRequestDTO": {
        "type": "object",
        "properties": {
          "noteText": {
            "type": "string",
            "nullable": true
          },
          "noteType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DealNoteCreateResponseDTO": {
        "type": "object",
        "properties": {
          "dealNoteID": {
            "type": "integer",
            "format": "int64"
          },
          "dealID": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DealNoteListDTO": {
        "type": "object",
        "properties": {
          "dealNoteID": {
            "type": "integer",
            "format": "int64"
          },
          "dealID": {
            "type": "integer",
            "format": "int64"
          },
          "noteType": {
            "type": "string",
            "nullable": true
          },
          "noteText": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdByName": {
            "type": "string",
            "nullable": true
          },
          "createdByEmail": {
            "type": "string",
            "nullable": true
          },
          "updatedByName": {
            "type": "string",
            "nullable": true
          },
          "updatedByEmail": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DealUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "groupCode": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormSendRequestDTO": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "integer",
            "format": "int32"
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "recipientName": {
            "type": "string",
            "nullable": true
          },
          "recipientEmail": {
            "type": "string",
            "nullable": true
          },
          "recipientMobile": {
            "type": "string",
            "nullable": true
          },
          "mute": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormSendResponseDTO": {
        "type": "object",
        "properties": {
          "formKey": {
            "type": "string",
            "format": "uuid"
          },
          "accessUrl": {
            "type": "string",
            "nullable": true
          },
          "emailSent": {
            "type": "boolean"
          },
          "sent": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EngagementFromTemplateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "entityKey": {
            "type": "string",
            "format": "uuid"
          },
          "templateId": {
            "type": "integer",
            "format": "int32"
          },
          "sendToClient": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "example": {
          "userKey": "11111111-2222-3333-4444-555555555555",
          "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
          "templateId": 17,
          "sendToClient": true
        }
      },
      "Application.APIData.DataObjects.EngagementFromTemplateResponseDTO": {
        "type": "object",
        "properties": {
          "engagementKey": {
            "type": "string",
            "format": "uuid"
          },
          "sentToClient": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "example": {
          "engagementKey": "8f9e2b1c-3d4a-5e6f-7890-abcdef012345",
          "sentToClient": true
        }
      },
      "Application.APIData.DataObjects.EngagementListDTO": {
        "type": "object",
        "properties": {
          "engagementKey": {
            "type": "string",
            "nullable": true
          },
          "engagementID": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "statusID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "sentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiryDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "clientName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "engagementKey": "8f9e2b1c-3d4a-5e6f-7890-abcdef012345",
          "engagementID": 12450,
          "name": "FY25 — Corporate tax proposal",
          "statusID": 3,
          "statusName": "Sent",
          "sentOn": "2025-04-08T11:30:00Z",
          "endDate": "2025-06-30T00:00:00Z",
          "expiryDate": "2025-05-15T00:00:00Z",
          "updatedOn": "2025-04-10T09:15:00Z",
          "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
          "clientName": "Riverstone Holdings Ltd"
        }
      },
      "Application.APIData.DataObjects.EngagementServiceListItemDTO": {
        "type": "object",
        "properties": {
          "serviceID": {
            "type": "integer",
            "format": "int32"
          },
          "parentServiceID": {
            "type": "integer",
            "description": "When set, this service is a child of the service whose serviceID equals this value. Omitted or null for top-level services.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "rangeMin": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "rangeMax": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "taxAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "serviceType": {
            "type": "string",
            "nullable": true
          },
          "frequency": {
            "type": "string",
            "nullable": true
          },
          "pricingType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "serviceID": 12040,
          "parentServiceID": null,
          "name": "Annual compliance — company",
          "detail": "Financial statements, income tax return, ASIC annual review.",
          "price": 2450,
          "rangeMin": null,
          "rangeMax": null,
          "taxAmount": 245,
          "serviceType": "Compliance",
          "frequency": "Annual",
          "pricingType": "Fixed fee"
        }
      },
      "Application.APIData.DataObjects.EngagementTemplateListItemDTO": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "inactive": {
            "type": "boolean"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "templateId": 17,
          "name": "Annual compliance — company",
          "inactive": false,
          "updatedOn": "2025-04-08T11:30:00Z"
        }
      },
      "Application.APIData.DataObjects.EngagementTemplatesListResponseDTO": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementTemplateListItemDTO"
            },
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "example": {
          "items": [
            {
              "templateId": 17,
              "name": "Annual compliance — company",
              "inactive": false,
              "updatedOn": "2025-04-08T11:30:00Z"
            },
            {
              "templateId": 24,
              "name": "New client onboarding pack",
              "inactive": false,
              "updatedOn": "2025-03-15T09:00:00Z"
            }
          ],
          "pageNumber": 1,
          "pageSize": 50,
          "hasMore": false
        }
      },
      "Application.APIData.DataObjects.EntityAddressCreateDTO": {
        "type": "object",
        "properties": {
          "address1": {
            "type": "string",
            "nullable": true
          },
          "address2": {
            "type": "string",
            "nullable": true
          },
          "address3": {
            "type": "string",
            "nullable": true
          },
          "address4": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EntityAddressDTO": {
        "type": "object",
        "properties": {
          "addressType": {
            "type": "string",
            "nullable": true
          },
          "address1": {
            "type": "string",
            "nullable": true
          },
          "address2": {
            "type": "string",
            "nullable": true
          },
          "address3": {
            "type": "string",
            "nullable": true
          },
          "address4": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "fullAddress": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EntityContactCreateRequestDTO": {
        "type": "object",
        "properties": {
          "contactID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "contactName": {
            "type": "string",
            "nullable": true
          },
          "contactSurname": {
            "type": "string",
            "nullable": true
          },
          "salutation": {
            "type": "string",
            "nullable": true
          },
          "addressee": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "type": "string",
            "nullable": true
          },
          "position": {
            "type": "string",
            "nullable": true
          },
          "isPrimary": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "example": {
          "contactName": "Jordan",
          "contactSurname": "Lee",
          "email": "jordan.lee@example.com",
          "mobile": "+61 400 222 333",
          "position": "Director",
          "isPrimary": true
        }
      },
      "Application.APIData.DataObjects.EntityContactCreateResponseDTO": {
        "type": "object",
        "properties": {
          "entityContactID": {
            "type": "integer",
            "format": "int64"
          },
          "contactID": {
            "type": "integer",
            "format": "int64"
          },
          "matchedExistingContact": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "example": {
          "entityContactID": 1205,
          "contactID": 88,
          "matchedExistingContact": false
        }
      },
      "Application.APIData.DataObjects.EntityContactListDTO": {
        "type": "object",
        "properties": {
          "entityContactID": {
            "type": "integer",
            "format": "int64"
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "contactID": {
            "type": "integer",
            "format": "int64"
          },
          "contactName": {
            "type": "string",
            "nullable": true
          },
          "contactSurname": {
            "type": "string",
            "nullable": true
          },
          "salutation": {
            "type": "string",
            "nullable": true
          },
          "addressee": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "type": "string",
            "nullable": true
          },
          "position": {
            "type": "string",
            "nullable": true
          },
          "isPrimary": {
            "type": "boolean"
          },
          "isDeleted": {
            "type": "boolean"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "entityContactID": 1205,
          "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
          "contactID": 88,
          "contactName": "Jordan",
          "contactSurname": "Lee",
          "email": "jordan.lee@example.com",
          "mobile": "+61 400 222 333",
          "position": "Director",
          "isPrimary": true,
          "isDeleted": false,
          "updatedOn": "2025-04-10T09:15:00Z"
        }
      },
      "Application.APIData.DataObjects.EntityContactUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "contactName": {
            "type": "string",
            "nullable": true
          },
          "contactSurname": {
            "type": "string",
            "nullable": true
          },
          "salutation": {
            "type": "string",
            "nullable": true
          },
          "addressee": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "type": "string",
            "nullable": true
          },
          "position": {
            "type": "string",
            "nullable": true
          },
          "isPrimary": {
            "type": "boolean"
          },
          "isDeleted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "example": {
          "contactName": "Jordan",
          "contactSurname": "Lee",
          "email": "jordan.lee@example.com",
          "position": "Managing Director",
          "isPrimary": true,
          "isDeleted": false
        }
      },
      "Application.APIData.DataObjects.EntityCreateRequestDTO": {
        "type": "object",
        "properties": {
          "entityTypeID": {
            "type": "integer",
            "format": "int32"
          },
          "entityType": {
            "type": "string",
            "nullable": true
          },
          "clientStatus": {
            "type": "string",
            "nullable": true
          },
          "entityCode": {
            "type": "string",
            "nullable": true
          },
          "externalSystemID": {
            "type": "string",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "otherName": {
            "type": "string",
            "nullable": true
          },
          "entitySurname": {
            "type": "string",
            "nullable": true
          },
          "entityInitials": {
            "type": "string",
            "nullable": true
          },
          "birthDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "incorporationDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "birthPlace": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "taxNumber": {
            "type": "string",
            "nullable": true
          },
          "taxNotRequired": {
            "type": "boolean"
          },
          "salesTaxNumber": {
            "type": "string",
            "nullable": true
          },
          "regNumber": {
            "type": "string",
            "nullable": true
          },
          "idNumber": {
            "type": "string",
            "nullable": true
          },
          "gender": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "physicalAddress": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityAddressCreateDTO"
          },
          "postalAddress": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityAddressCreateDTO"
          }
        },
        "additionalProperties": false,
        "example": {
          "entityType": "Company",
          "entityTypeID": 2,
          "clientStatus": "Lead",
          "entityCode": "NEW-2048",
          "externalSystemID": "EXT-9001",
          "entityName": "Harbour View Pty Ltd",
          "email": "contact@harbourview.example",
          "telephone": "+61 2 8000 3300",
          "physicalAddress": {
            "address1": "Level 4, 55 Pitt Street",
            "city": "Sydney",
            "state": "NSW",
            "postcode": "2000",
            "country": "AU"
          }
        }
      },
      "Application.APIData.DataObjects.EntityCustomFieldApiDTO": {
        "type": "object",
        "properties": {
          "customFieldId": {
            "type": "integer",
            "description": "Practice custom field definition id.",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "description": "Display name of the field."
          },
          "type": {
            "type": "string",
            "description": "Field type (e.g. Text, Drop-Down, Checkbox, User List, Date)."
          },
          "value": {
            "type": "string",
            "description": "Stored value.",
            "nullable": true
          },
          "displayValue": {
            "type": "string",
            "description": "Human-readable value.",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "description": "Last update (UTC).",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "customFieldId": 42,
          "name": "Industry sector",
          "type": "Drop-Down",
          "value": "Professional services",
          "displayValue": "Professional services",
          "updatedOn": "2025-04-10T04:05:00Z"
        }
      },
      "Application.APIData.DataObjects.EntityDetailDTO": {
        "type": "object",
        "properties": {
          "practiceKey": {
            "type": "string",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "externalSystemID": {
            "type": "string",
            "nullable": true
          },
          "entityCode": {
            "type": "string",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "otherName": {
            "type": "string",
            "nullable": true
          },
          "entitySurname": {
            "type": "string",
            "nullable": true
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "entitySalutation": {
            "type": "string",
            "description": "Friendly or preferred name for the client (not an honorific title such as Mr or Ms).",
            "nullable": true
          },
          "entityInitials": {
            "type": "string",
            "nullable": true
          },
          "birthDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "incorporationDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "birthPlace": {
            "type": "string",
            "nullable": true
          },
          "gender": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "regNumber": {
            "type": "string",
            "nullable": true
          },
          "salesTaxNumber": {
            "type": "string",
            "nullable": true
          },
          "taxNotRequired": {
            "type": "boolean"
          },
          "entityTerminated": {
            "type": "boolean"
          },
          "terminatedDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isTaxEntity": {
            "type": "boolean"
          },
          "isAMLEntity": {
            "type": "boolean"
          },
          "isSecEntity": {
            "type": "boolean"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "entityTypeName": {
            "type": "string",
            "nullable": true
          },
          "clientStatusName": {
            "type": "string",
            "nullable": true
          },
          "partnerName": {
            "type": "string",
            "nullable": true
          },
          "partnerKey": {
            "type": "string",
            "nullable": true
          },
          "managerName": {
            "type": "string",
            "nullable": true
          },
          "managerKey": {
            "type": "string",
            "nullable": true
          },
          "inChargeName": {
            "type": "string",
            "nullable": true
          },
          "inChargeKey": {
            "type": "string",
            "nullable": true
          },
          "officeName": {
            "type": "string",
            "nullable": true
          },
          "groupName": {
            "type": "string",
            "nullable": true
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityAddressDTO"
            },
            "nullable": true
          },
          "customFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityCustomFieldApiDTO"
            },
            "description": "Custom field values set on this client (active definitions only). Empty array when none are set."
          },
          "verification": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityVerificationApiDTO"
          }
        },
        "additionalProperties": false,
        "example": {
          "practiceKey": "7e8f9a0b-1c2d-3e4f-5a6b-7c8d9e0f1a2b",
          "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
          "externalSystemID": "CRM-88421",
          "entityCode": "RS-10492",
          "entityName": "Riverstone Holdings Ltd",
          "fullName": "Riverstone Holdings Ltd",
          "entitySalutation": "Riverstone",
          "birthDate": "1990-05-15",
          "email": "accounts@riverstone.example",
          "telephone": "+61 3 9000 1200",
          "entityTypeName": "Company",
          "clientStatusName": "Active",
          "taxNotRequired": false,
          "entityTerminated": false,
          "isTaxEntity": true,
          "updatedOn": "2025-04-10T04:05:00Z",
          "verification": {
            "requestedMethod": "ComplyCube",
            "isVerified": true,
            "verifiedDate": "2025-04-09T12:00:00Z",
            "verificationMethod": "ComplyCube",
            "verificationStatus": "complete",
            "documentCheckId": "chk_doc_abc123",
            "identityCheckId": "chk_id_xyz789",
            "amlCheckId": "chk_aml_def456"
          },
          "customFields": [
            {
              "customFieldId": 42,
              "name": "Industry sector",
              "type": "Drop-Down",
              "value": "Professional services",
              "displayValue": "Professional services",
              "updatedOn": "2025-04-10T04:05:00Z"
            },
            {
              "customFieldId": 7,
              "name": "Partner responsible",
              "type": "User List",
              "value": "123",
              "displayValue": "Jane Smith",
              "updatedOn": "2025-03-01T10:00:00Z"
            }
          ]
        }
      },
      "Application.APIData.DataObjects.EntityIntegrationIdsDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "xpmClientID": {
            "type": "string",
            "nullable": true
          },
          "xglClientID": {
            "type": "string",
            "nullable": true
          },
          "gsClientID": {
            "type": "string",
            "nullable": true
          },
          "kloudConnectClientID": {
            "type": "string",
            "nullable": true
          },
          "fyiClientID": {
            "type": "string",
            "nullable": true
          },
          "karbonClientID": {
            "type": "string",
            "nullable": true
          },
          "karbonEntityType": {
            "type": "string",
            "nullable": true
          },
          "qbClientID": {
            "type": "string",
            "nullable": true
          },
          "freeAgentClientUrl": {
            "type": "string",
            "nullable": true
          },
          "bglID": {
            "type": "string",
            "nullable": true
          },
          "bglContactID": {
            "type": "string",
            "nullable": true
          },
          "bglSmsfID": {
            "type": "string",
            "nullable": true
          },
          "bglSmsfFirm": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
          "entityName": "Riverstone Holdings Ltd",
          "xpmClientID": "xpm-48291",
          "xglClientID": "XGL-00921",
          "gsClientID": null,
          "kloudConnectClientID": null,
          "fyiClientID": "FYI-CL-88321",
          "karbonClientID": null,
          "qbClientID": null,
          "bglID": null,
          "bglContactID": null
        }
      },
      "Application.APIData.DataObjects.EntityListDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "externalSystemID": {
            "type": "string",
            "nullable": true
          },
          "entityCode": {
            "type": "string",
            "nullable": true
          },
          "fullEntityName": {
            "type": "string",
            "nullable": true
          },
          "entitySalutation": {
            "type": "string",
            "description": "Friendly or preferred name for the client (not an honorific title such as Mr or Ms).",
            "nullable": true
          },
          "entityInitials": {
            "type": "string",
            "nullable": true
          },
          "entityBirthDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "entityIncorporationDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "entityBirthPlace": {
            "type": "string",
            "nullable": true
          },
          "entityEmail": {
            "type": "string",
            "nullable": true
          },
          "entityTelephone": {
            "type": "string",
            "nullable": true
          },
          "entityMobile": {
            "type": "string",
            "nullable": true
          },
          "entitySalesTaxNumber": {
            "type": "string",
            "nullable": true
          },
          "entityRegNumber": {
            "type": "string",
            "nullable": true
          },
          "entityIDNumber": {
            "type": "string",
            "nullable": true
          },
          "entityTerminated": {
            "type": "boolean"
          },
          "entityType": {
            "type": "string",
            "nullable": true
          },
          "officeName": {
            "type": "string",
            "nullable": true
          },
          "groupName": {
            "type": "string",
            "nullable": true
          },
          "isTaxEntity": {
            "type": "boolean"
          },
          "isAMLEntity": {
            "type": "boolean"
          },
          "isSecEntity": {
            "type": "boolean"
          },
          "partnerName": {
            "type": "string",
            "nullable": true
          },
          "managerName": {
            "type": "string",
            "nullable": true
          },
          "inChargeName": {
            "type": "string",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
          "externalSystemID": "CRM-88421",
          "entityCode": "RS-10492",
          "fullEntityName": "Riverstone Holdings Ltd",
          "entitySalutation": "Riverstone",
          "entityInitials": "RH",
          "entityBirthDate": "1990-05-15",
          "entityEmail": "accounts@riverstone.example",
          "entityTelephone": "+61 3 9000 1200",
          "entityMobile": "+61 400 555 220",
          "entitySalesTaxNumber": "12 345 678 901",
          "entityRegNumber": "ACN 123 456 789",
          "entityTerminated": false,
          "entityType": "Company",
          "officeName": "Melbourne",
          "isTaxEntity": true,
          "updatedOn": "2025-04-10T04:05:00Z"
        }
      },
      "Application.APIData.DataObjects.EntityVerificationApiDTO": {
        "type": "object",
        "properties": {
          "requestedMethod": {
            "type": "string",
            "nullable": true
          },
          "isVerified": {
            "type": "boolean"
          },
          "verifiedDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "verificationMethod": {
            "type": "string",
            "nullable": true
          },
          "verificationStatus": {
            "type": "string",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "documentCheckId": {
            "type": "string",
            "nullable": true
          },
          "identityCheckId": {
            "type": "string",
            "nullable": true
          },
          "amlCheckId": {
            "type": "string",
            "nullable": true
          },
          "multiBureauCheckId": {
            "type": "string",
            "nullable": true
          },
          "primaryDocument": {
            "type": "string",
            "nullable": true
          },
          "primaryDocumentBack": {
            "type": "string",
            "nullable": true
          },
          "secondaryDocument": {
            "type": "string",
            "nullable": true
          },
          "thirdDocument": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.FormTemplateListItemDTO": {
        "type": "object",
        "properties": {
          "formTemplateId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "formTypeName": {
            "type": "string",
            "nullable": true
          },
          "emailSubject": {
            "type": "string",
            "nullable": true
          },
          "emailContent": {
            "type": "string",
            "nullable": true
          },
          "questionCount": {
            "type": "integer",
            "format": "int32"
          },
          "inactive": {
            "type": "boolean"
          },
          "templateCategory": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.FormTemplatesListResponseDTO": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.FormTemplateListItemDTO"
            },
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.IdVerificationSendRequestDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "entityEmail": {
            "type": "string",
            "nullable": true
          },
          "entityMobile": {
            "type": "string",
            "nullable": true
          },
          "includeAml": {
            "type": "string",
            "nullable": true
          },
          "mute": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.IdVerificationSendResponseDTO": {
        "type": "object",
        "properties": {
          "verificationKey": {
            "type": "string",
            "format": "uuid"
          },
          "wallet": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.IdVerificationSendWalletDTO"
          },
          "accessUrl": {
            "type": "string",
            "nullable": true
          },
          "emailSent": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.IdVerificationSendWalletDTO": {
        "type": "object",
        "properties": {
          "identityVerificationFromWallet": {
            "type": "number",
            "format": "double"
          },
          "amlOnWalletBecausePoolEmpty": {
            "type": "number",
            "format": "double"
          },
          "totalWalletRequired": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.LeadConvertToClientResponseDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "nullable": true
          },
          "clientStatus": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
          "clientStatus": "Active"
        }
      },
      "Application.APIData.DataObjects.LeadCreateRequestDTO": {
        "type": "object",
        "properties": {
          "entityTypeID": {
            "type": "integer",
            "format": "int32"
          },
          "entityType": {
            "type": "string",
            "nullable": true
          },
          "entityCode": {
            "type": "string",
            "nullable": true
          },
          "externalSystemID": {
            "type": "string",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "otherName": {
            "type": "string",
            "nullable": true
          },
          "entitySurname": {
            "type": "string",
            "nullable": true
          },
          "entityInitials": {
            "type": "string",
            "nullable": true
          },
          "birthDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "incorporationDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "birthPlace": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "taxNumber": {
            "type": "string",
            "nullable": true
          },
          "taxNotRequired": {
            "type": "boolean"
          },
          "salesTaxNumber": {
            "type": "string",
            "nullable": true
          },
          "regNumber": {
            "type": "string",
            "nullable": true
          },
          "idNumber": {
            "type": "string",
            "nullable": true
          },
          "gender": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "physicalAddress": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityAddressCreateDTO"
          },
          "postalAddress": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityAddressCreateDTO"
          },
          "leadSource": {
            "type": "string",
            "nullable": true
          },
          "leadStatus": {
            "type": "string",
            "nullable": true
          },
          "leadValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "noteText": {
            "type": "string",
            "nullable": true
          },
          "noteType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "entityType": "Individual",
          "entityName": "Alex",
          "entitySurname": "Morgan",
          "email": "alex@example.com",
          "mobile": "+61 400 555 010",
          "externalSystemID": "CRM-LEAD-9901",
          "leadSource": "Website enquiry",
          "leadStatus": "New",
          "leadValue": 3200,
          "noteText": "Interested in annual compliance and bookkeeping.",
          "noteType": "API intake"
        }
      },
      "Application.APIData.DataObjects.LeadCreateResponseDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "nullable": true
          },
          "leadDetailID": {
            "type": "integer",
            "format": "int64"
          },
          "leadNoteID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
          "leadDetailID": 501,
          "leadNoteID": 8801
        }
      },
      "Application.APIData.DataObjects.LeadDetailDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "leadDetailID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "externalSystemID": {
            "type": "string",
            "nullable": true
          },
          "entityCode": {
            "type": "string",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "otherName": {
            "type": "string",
            "nullable": true
          },
          "entitySurname": {
            "type": "string",
            "nullable": true
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "entityInitials": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "nullable": true
          },
          "leadSource": {
            "type": "string",
            "nullable": true
          },
          "leadStatus": {
            "type": "string",
            "nullable": true
          },
          "leadValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
          "leadDetailID": 501,
          "entityName": "Harbour View",
          "entitySurname": "Pty Ltd",
          "fullName": "Harbour View Pty Ltd",
          "email": "contact@harbourview.example",
          "leadSource": "Website enquiry",
          "leadStatus": "New",
          "leadValue": 4500,
          "updatedOn": "2025-04-10T09:15:00Z"
        }
      },
      "Application.APIData.DataObjects.LeadListDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "leadDetailID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "externalSystemID": {
            "type": "string",
            "nullable": true
          },
          "entityCode": {
            "type": "string",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "entitySurname": {
            "type": "string",
            "nullable": true
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "nullable": true
          },
          "leadSource": {
            "type": "string",
            "nullable": true
          },
          "leadStatus": {
            "type": "string",
            "nullable": true
          },
          "leadValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "updatedByName": {
            "type": "string",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
          "leadDetailID": 501,
          "externalSystemID": "CRM-LEAD-8821",
          "entityCode": "LD-2048",
          "entityName": "Harbour View",
          "entitySurname": "Pty Ltd",
          "fullName": "Harbour View Pty Ltd",
          "email": "contact@harbourview.example",
          "mobile": "+61 400 111 222",
          "entityType": "Company",
          "leadSource": "Website enquiry",
          "leadStatus": "New",
          "leadValue": 4500,
          "updatedByName": "Alex Morgan",
          "updatedOn": "2025-04-10T09:15:00Z"
        }
      },
      "Application.APIData.DataObjects.LeadNoteCreateRequestDTO": {
        "type": "object",
        "properties": {
          "noteText": {
            "type": "string",
            "nullable": true
          },
          "noteType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "noteText": "Sent introductory email and calendar link.",
          "noteType": "Outreach"
        }
      },
      "Application.APIData.DataObjects.LeadNoteCreateResponseDTO": {
        "type": "object",
        "properties": {
          "leadNoteID": {
            "type": "integer",
            "format": "int64"
          },
          "leadDetailID": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "example": {
          "leadNoteID": 8802,
          "leadDetailID": 501
        }
      },
      "Application.APIData.DataObjects.LeadNoteListDTO": {
        "type": "object",
        "properties": {
          "leadNoteID": {
            "type": "integer",
            "format": "int64"
          },
          "leadDetailID": {
            "type": "integer",
            "format": "int64"
          },
          "noteType": {
            "type": "string",
            "nullable": true
          },
          "noteText": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdByName": {
            "type": "string",
            "nullable": true
          },
          "createdByEmail": {
            "type": "string",
            "nullable": true
          },
          "updatedByName": {
            "type": "string",
            "nullable": true
          },
          "updatedByEmail": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "leadNoteID": 8801,
          "leadDetailID": 501,
          "noteType": "Follow-up",
          "noteText": "Called client — requested proposal by Friday.",
          "createdOn": "2025-04-11T14:20:00Z",
          "createdByName": "Alex Morgan",
          "createdByEmail": "alex@practice.example"
        }
      },
      "Application.APIData.DataObjects.OnboardingClientCreateDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "clientCode": {
            "type": "string",
            "nullable": true
          },
          "entityTypeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "surname": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "requireTaxDetails": {
            "type": "boolean"
          },
          "identityVerification": {
            "type": "boolean"
          },
          "verificationMethod": {
            "type": "string",
            "nullable": true
          },
          "requireDocuments": {
            "type": "boolean"
          },
          "documents": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "requestAccountingFileAccess": {
            "type": "boolean"
          },
          "accountingFileInviteName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingClientCreatedItemDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "clientCode": {
            "type": "string",
            "nullable": true
          },
          "entityOnboardingId": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingCreateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "sendToRecipient": {
            "type": "boolean"
          },
          "recipient": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRecipientCreateDTO"
          },
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientCreateDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "userKey": "11111111-2222-3333-4444-555555555555",
          "sendToRecipient": true,
          "recipient": {
            "name": "Alex",
            "surname": "Nguyen",
            "email": "alex.nguyen@client.example",
            "mobile": "+61 412 555 014",
            "sendSms": false
          },
          "clients": [
            {
              "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
              "clientCode": "RS-10492",
              "requireTaxDetails": true,
              "requireDocuments": true,
              "documents": [
                "Certificate of incorporation"
              ],
              "identityVerification": false
            },
            {
              "entityType": "Individual",
              "name": "Jordan",
              "surname": "Lee",
              "identityVerification": true,
              "verificationMethod": "Standard"
            }
          ]
        }
      },
      "Application.APIData.DataObjects.OnboardingCreateResponseDTO": {
        "type": "object",
        "properties": {
          "onboardingKey": {
            "type": "string",
            "format": "uuid"
          },
          "sentToRecipient": {
            "type": "boolean"
          },
          "recipientKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "recipientAccessUrl": {
            "type": "string",
            "nullable": true
          },
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientCreatedItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "onboardingKey": "aabbccdd-1122-3344-5566-77889900aabb",
          "sentToRecipient": true,
          "recipientKey": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
          "recipientAccessUrl": "https://app.example/clients/welcome?key=aabbccdd-1122-3344-5566-77889900aabb&recipientKey=f1e2d3c4-b5a6-7890-abcd-ef1234567890",
          "clients": [
            {
              "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
              "clientCode": "RS-10492",
              "entityOnboardingId": 501
            },
            {
              "entityKey": null,
              "clientCode": null,
              "entityOnboardingId": 502
            }
          ]
        }
      },
      "Application.APIData.DataObjects.OnboardingDetailDTO": {
        "type": "object",
        "properties": {
          "onboardingKey": {
            "type": "string",
            "format": "uuid"
          },
          "onboardingID": {
            "type": "integer",
            "format": "int32"
          },
          "statusID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "sentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "submittedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdByKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "approverKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "engagementKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "formKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingEntityApiDTO"
            },
            "nullable": true
          },
          "recipients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRecipientListDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "onboardingKey": "aabbccdd-1122-3344-5566-77889900aabb",
          "onboardingID": 8934,
          "statusID": 2,
          "statusName": "In progress",
          "createdOn": "2025-04-07T10:00:00Z",
          "sentOn": "2025-04-08T07:45:00Z",
          "updatedOn": "2025-04-10T06:30:00Z",
          "engagementKey": "8f9e2b1c-3d4a-5e6f-7890-abcdef012345",
          "formKey": "99999999-8888-7777-6666-555555555555",
          "entities": [
            {
              "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
              "entityOnboardingID": 501,
              "entityTypeName": "Company",
              "completed": false,
              "requireDocs": true,
              "mustVerify": true,
              "name": "Riverstone Holdings Ltd",
              "email": "accounts@riverstone.example",
              "requiredDocs": [ ],
              "verification": {
                "requestedMethod": "ComplyCube",
                "isVerified": true,
                "verifiedDate": "2025-04-09T12:00:00Z",
                "verificationMethod": "ComplyCube",
                "verificationStatus": "complete",
                "documentCheckId": "chk_doc_abc123",
                "identityCheckId": "chk_id_xyz789",
                "amlCheckId": "chk_aml_def456"
              }
            }
          ],
          "recipients": [ ]
        }
      },
      "Application.APIData.DataObjects.OnboardingDocumentApiDTO": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": "integer",
            "format": "int32"
          },
          "documentRequested": {
            "type": "string",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "isUploaded": {
            "type": "boolean"
          },
          "uploadedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isBypassed": {
            "type": "boolean"
          },
          "bypassReason": {
            "type": "string",
            "nullable": true
          },
          "isUserUploaded": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingDocumentSignedUrlDTO": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingDocumentsListDTO": {
        "type": "object",
        "properties": {
          "onboardingKey": {
            "type": "string",
            "format": "uuid"
          },
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingEntityDocumentsApiDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingEntityApiDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "entityOnboardingID": {
            "type": "integer",
            "format": "int32"
          },
          "entityTypeName": {
            "type": "string",
            "nullable": true
          },
          "completed": {
            "type": "boolean"
          },
          "requireDocs": {
            "type": "boolean"
          },
          "mustVerify": {
            "type": "boolean"
          },
          "canDelete": {
            "type": "boolean"
          },
          "requiredDocs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.RequiredDocumentApiDTO"
            },
            "nullable": true
          },
          "verification": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityVerificationApiDTO"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "surname": {
            "type": "string",
            "nullable": true
          },
          "otherName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "address1": {
            "type": "string",
            "nullable": true
          },
          "address2": {
            "type": "string",
            "nullable": true
          },
          "address3": {
            "type": "string",
            "nullable": true
          },
          "address4": {
            "type": "string",
            "nullable": true
          },
          "addressCity": {
            "type": "string",
            "nullable": true
          },
          "addressState": {
            "type": "string",
            "nullable": true
          },
          "addressCode": {
            "type": "string",
            "nullable": true
          },
          "addressCountry": {
            "type": "string",
            "nullable": true
          },
          "pAddress1": {
            "type": "string",
            "nullable": true
          },
          "pAddress2": {
            "type": "string",
            "nullable": true
          },
          "pAddress3": {
            "type": "string",
            "nullable": true
          },
          "pAddress4": {
            "type": "string",
            "nullable": true
          },
          "pAddressCity": {
            "type": "string",
            "nullable": true
          },
          "pAddressState": {
            "type": "string",
            "nullable": true
          },
          "pAddressCode": {
            "type": "string",
            "nullable": true
          },
          "pAddressCountry": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingEntityDocumentsApiDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "entityOnboardingId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "surname": {
            "type": "string",
            "nullable": true
          },
          "entityTypeName": {
            "type": "string",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentApiDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingListDTO": {
        "type": "object",
        "properties": {
          "onboardingKey": {
            "type": "string",
            "format": "uuid"
          },
          "onboardingID": {
            "type": "integer",
            "format": "int32"
          },
          "statusID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "sentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "submittedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdByKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "approverKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "engagementKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "formKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "recipients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRecipientListDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "onboardingKey": "aabbccdd-1122-3344-5566-77889900aabb",
          "onboardingID": 8934,
          "statusID": 2,
          "statusName": "In progress",
          "createdOn": "2025-04-07T10:00:00Z",
          "sentOn": "2025-04-08T07:45:00Z",
          "submittedOn": null,
          "completedOn": null,
          "updatedOn": "2025-04-10T06:30:00Z",
          "createdByKey": "11111111-2222-3333-4444-555555555555",
          "approverKey": null,
          "engagementKey": "8f9e2b1c-3d4a-5e6f-7890-abcdef012345",
          "formKey": "99999999-8888-7777-6666-555555555555",
          "recipients": [
            {
              "recipientKey": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
              "name": "Alex",
              "surname": "Nguyen",
              "email": "alex.nguyen@client.example",
              "mobile": "+61 412 555 014",
              "sendOrder": 1,
              "sentOn": "2025-04-09T08:00:00Z",
              "submittedOn": "2025-04-09T14:22:00Z"
            }
          ]
        }
      },
      "Application.APIData.DataObjects.OnboardingRecipientCreateDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "surname": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "sendSms": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingRecipientListDTO": {
        "type": "object",
        "properties": {
          "recipientKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "surname": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "sendOrder": {
            "type": "integer",
            "format": "int32"
          },
          "sentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "submittedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "recipientKey": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
          "name": "Alex",
          "surname": "Nguyen",
          "email": "alex.nguyen@client.example",
          "mobile": "+61 412 555 014",
          "sendOrder": 1,
          "sentOn": "2025-04-09T08:00:00Z",
          "submittedOn": "2025-04-09T14:22:00Z"
        }
      },
      "Application.APIData.DataObjects.PracticeInfoDTO": {
        "type": "object",
        "properties": {
          "practiceKey": {
            "type": "string",
            "nullable": true
          },
          "practiceName": {
            "type": "string",
            "nullable": true
          },
          "businessEmail": {
            "type": "string",
            "nullable": true
          },
          "emailAddress": {
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "type": "string",
            "nullable": true
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "businessNumber": {
            "type": "string",
            "nullable": true
          },
          "practiceLocked": {
            "type": "boolean"
          },
          "practiceOwner": {
            "type": "string",
            "nullable": true
          },
          "paymentVendor": {
            "type": "string",
            "nullable": true
          },
          "countryName": {
            "type": "string",
            "nullable": true
          },
          "industryName": {
            "type": "string",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "practiceKey": "7e8f9a0b-1c2d-3e4f-5a6b-7c8d9e0f1a2b",
          "practiceName": "Northbridge Advisory Pty Ltd",
          "businessEmail": "hello@northbridge.example",
          "emailAddress": "admin@northbridge.example",
          "telephone": "+61 3 9000 4400",
          "website": "https://northbridge.example",
          "businessNumber": "12 345 678 901",
          "practiceLocked": false,
          "practiceOwner": "Sam Taylor",
          "countryName": "Australia",
          "industryName": "Accounting",
          "updatedOn": "2025-04-01T00:00:00Z"
        }
      },
      "Application.APIData.DataObjects.PracticeOptionListDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "sortOrder": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.PracticeSubscriptionDTO": {
        "type": "object",
        "properties": {
          "practiceKey": {
            "type": "string",
            "nullable": true
          },
          "hasSubscriptionRecord": {
            "type": "boolean"
          },
          "isSubscriptionValid": {
            "type": "boolean"
          },
          "availableRequestCount": {
            "type": "number",
            "format": "double"
          },
          "plan": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.PracticeSubscriptionPlanDTO"
          }
        },
        "additionalProperties": false,
        "example": {
          "practiceKey": "7e8f9a0b-1c2d-3e4f-5a6b-7c8d9e0f1a2b",
          "hasSubscriptionRecord": true,
          "isSubscriptionValid": true,
          "availableRequestCount": 42,
          "plan": {
            "pricingName": "Pro",
            "pricingFrequency": "Monthly",
            "validFrom": "2025-04-01T00:00:00Z",
            "validUntil": null,
            "requestCount": 8,
            "requestTotal": 50
          }
        }
      },
      "Application.APIData.DataObjects.PracticeSubscriptionPlanDTO": {
        "type": "object",
        "properties": {
          "pricingName": {
            "type": "string",
            "nullable": true
          },
          "pricingFrequency": {
            "type": "string",
            "nullable": true
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "validUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "requestCount": {
            "type": "number",
            "format": "double"
          },
          "requestTotal": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCloneResponseDTO": {
        "type": "object",
        "properties": {
          "sourceEngagementKey": {
            "type": "string",
            "format": "uuid"
          },
          "engagementKey": {
            "type": "string",
            "format": "uuid"
          },
          "sentToClient": {
            "type": "boolean"
          },
          "sourceMarkedRenewed": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "example": {
          "sourceEngagementKey": "8f9e2b1c-3d4a-5e6f-7890-abcdef012345",
          "engagementKey": "9a0b1c2d-4e5f-6071-890a-bcdef0123456",
          "sentToClient": false,
          "sourceMarkedRenewed": false
        }
      },
      "Application.APIData.DataObjects.ProposalCreateFyiJobDTO": {
        "type": "object",
        "properties": {
          "jobName": {
            "type": "string",
            "nullable": true
          },
          "fyiTemplateId": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "managerEmail": {
            "type": "string",
            "nullable": true
          },
          "partnerEmail": {
            "type": "string",
            "nullable": true
          },
          "sourceID": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateIdentityPersonDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "surname": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "verificationMethod": {
            "type": "string",
            "nullable": true
          },
          "includeEngagement": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateInvoiceDTO": {
        "type": "object",
        "properties": {
          "billDate": {
            "type": "string",
            "format": "date"
          },
          "dueDate": {
            "type": "string",
            "format": "date"
          },
          "billDetails": {
            "type": "string",
            "nullable": true
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "billNow": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "syncNow": {
            "type": "boolean",
            "nullable": true
          },
          "sendBill": {
            "type": "boolean",
            "nullable": true
          },
          "brandingThemeID": {
            "type": "string",
            "nullable": true
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.BillCreateLineItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateOnboardingDTO": {
        "type": "object",
        "properties": {
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientCreateDTO"
            },
            "nullable": true
          },
          "recipients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRecipientCreateDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateRecurringBillingDTO": {
        "type": "object",
        "properties": {
          "frequency": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "nextRunDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "dueDays": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "billDetails": {
            "type": "string",
            "nullable": true
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "brandingThemeID": {
            "type": "string",
            "nullable": true
          },
          "sendBill": {
            "type": "boolean",
            "nullable": true
          },
          "billNow": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.BillCreateLineItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "entityKey": {
            "type": "string",
            "format": "uuid"
          },
          "sendToClient": {
            "type": "boolean"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "startOnAcceptance": {
            "type": "boolean",
            "nullable": true
          },
          "currencyID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "lengthID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "terms": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateServiceDTO"
            },
            "nullable": true
          },
          "xpmJobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateXpmJobDTO"
            },
            "nullable": true
          },
          "fyiJobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateFyiJobDTO"
            },
            "nullable": true
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateInvoiceDTO"
            },
            "nullable": true
          },
          "recurringBillings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateRecurringBillingDTO"
            },
            "nullable": true
          },
          "requestPaymentDetails": {
            "type": "boolean"
          },
          "paymentDetailsType": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sendSms": {
            "type": "boolean",
            "nullable": true
          },
          "expiryDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "identityVerification": {
            "type": "boolean"
          },
          "verificationMethod": {
            "type": "string",
            "nullable": true
          },
          "identityPeople": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateIdentityPersonDTO"
            },
            "nullable": true
          },
          "onboarding": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateOnboardingDTO"
          }
        },
        "additionalProperties": false,
        "example": {
          "userKey": "11111111-2222-3333-4444-555555555555",
          "entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
          "name": "FY26 tax engagement",
          "sendToClient": false,
          "startOnAcceptance": true,
          "note": "Adhoc proposal with custom services and jobs.",
          "services": [
            {
              "serviceID": 12040,
              "quantity": 1,
              "packageNumber": 1
            }
          ],
          "xpmJobs": [
            {
              "name": "Income tax return",
              "templateUuid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
            }
          ],
          "fyiJobs": [
            {
              "jobName": "Income tax return",
              "fyiTemplateId": "10492",
              "state": "Planned",
              "managerEmail": "manager@practice.example",
              "partnerEmail": "partner@practice.example"
            }
          ],
          "invoices": [
            {
              "billDate": "2026-07-01",
              "dueDate": "2026-07-31",
              "billNow": 1,
              "lineItems": [
                {
                  "amount": 2450,
                  "taxPercent": 10,
                  "narration": "Annual tax return",
                  "serviceID": 12040
                }
              ]
            }
          ]
        }
      },
      "Application.APIData.DataObjects.ProposalCreateServiceDTO": {
        "type": "object",
        "properties": {
          "serviceID": {
            "type": "integer",
            "format": "int32"
          },
          "quantity": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "price": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "taxAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isOptional": {
            "type": "boolean"
          },
          "discountPerc": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "discountAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "serviceDetail": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateXpmJobDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "templateUuid": {
            "type": "string",
            "format": "uuid"
          },
          "categoryId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "budget": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "partnerUuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "managerUuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalDuplicateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "sendToClient": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "example": {
          "userKey": "11111111-2222-3333-4444-555555555555",
          "sendToClient": false
        }
      },
      "Application.APIData.DataObjects.ProposalFyiJobStateListItemDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "displayOrder": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "name": "Planned",
          "type": "standard",
          "displayOrder": 1
        }
      },
      "Application.APIData.DataObjects.ProposalFyiJobTemplateListItemDTO": {
        "type": "object",
        "properties": {
          "fyiTemplateId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "jobName": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "fyiTemplateId": "10492",
          "name": "Individual tax return",
          "jobName": "ITR — {Client}",
          "type": "standard",
          "status": 1
        }
      },
      "Application.APIData.DataObjects.ProposalPackageDTO": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementServiceListItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "templateId": 42,
          "name": "Standard annual compliance",
          "services": [
            {
              "serviceID": 12040,
              "parentServiceID": null,
              "name": "Annual accounts — company",
              "detail": "Financial statements and tax return.",
              "price": 2450,
              "rangeMin": null,
              "rangeMax": null,
              "taxAmount": 245,
              "serviceType": "Compliance",
              "frequency": "Annual",
              "pricingType": "Fixed fee"
            }
          ]
        }
      },
      "Application.APIData.DataObjects.ProposalPricingFyiJobDTO": {
        "type": "object",
        "properties": {
          "jobName": {
            "type": "string",
            "nullable": true
          },
          "fyiTemplateId": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "managerEmail": {
            "type": "string",
            "nullable": true
          },
          "partnerEmail": {
            "type": "string",
            "nullable": true
          },
          "sourceID": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalPricingInvoiceDTO": {
        "type": "object",
        "properties": {
          "billingID": {
            "type": "integer",
            "format": "int32"
          },
          "billDate": {
            "type": "string",
            "format": "date"
          },
          "dueDate": {
            "type": "string",
            "format": "date"
          },
          "billDetails": {
            "type": "string",
            "nullable": true
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "billNow": {
            "type": "integer",
            "format": "int32"
          },
          "syncNow": {
            "type": "boolean"
          },
          "sendBill": {
            "type": "boolean"
          },
          "billAmount": {
            "type": "number",
            "format": "double"
          },
          "billTax": {
            "type": "number",
            "format": "double"
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPricingInvoiceLineDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalPricingInvoiceLineDTO": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "double"
          },
          "taxAmount": {
            "type": "number",
            "format": "double"
          },
          "total": {
            "type": "number",
            "format": "double"
          },
          "narration": {
            "type": "string",
            "nullable": true
          },
          "extAccountID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "extItemID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "extTaxID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "serviceID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "orderID": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalPricingRecurringDTO": {
        "type": "object",
        "properties": {
          "recurringBillingID": {
            "type": "integer",
            "format": "int64"
          },
          "frequency": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "nextRunDate": {
            "type": "string",
            "format": "date"
          },
          "billAmount": {
            "type": "number",
            "format": "double"
          },
          "billTax": {
            "type": "number",
            "format": "double"
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "billDetails": {
            "type": "string",
            "nullable": true
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "dueDays": {
            "type": "integer",
            "format": "int32"
          },
          "isActive": {
            "type": "boolean"
          },
          "billNow": {
            "type": "integer",
            "format": "int32"
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPricingInvoiceLineDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalPricingServiceDTO": {
        "type": "object",
        "properties": {
          "serviceID": {
            "type": "integer",
            "format": "int32"
          },
          "parentServiceID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "serviceName": {
            "type": "string",
            "nullable": true
          },
          "serviceDetail": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "quantity": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "taxAmount": {
            "type": "number",
            "format": "double"
          },
          "discountPerc": {
            "type": "number",
            "format": "double"
          },
          "discountAmount": {
            "type": "number",
            "format": "double"
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pricingTypeName": {
            "type": "string",
            "nullable": true
          },
          "frequency": {
            "type": "string",
            "nullable": true
          },
          "isOptional": {
            "type": "boolean"
          },
          "lineTotal": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalPricingSnapshotDTO": {
        "type": "object",
        "properties": {
          "engagementKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "statusID": {
            "type": "integer",
            "format": "int32"
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "currencyID": {
            "type": "integer",
            "format": "int32"
          },
          "currencyName": {
            "type": "string",
            "nullable": true
          },
          "createBills": {
            "type": "boolean"
          },
          "recurringBilling": {
            "type": "integer",
            "format": "int32"
          },
          "createXpmJobs": {
            "type": "boolean"
          },
          "createFyiJobs": {
            "type": "boolean"
          },
          "servicesTotal": {
            "type": "number",
            "format": "double"
          },
          "invoicesTotal": {
            "type": "number",
            "format": "double"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPricingServiceDTO"
            },
            "nullable": true
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPricingInvoiceDTO"
            },
            "nullable": true
          },
          "recurringBillings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPricingRecurringDTO"
            },
            "nullable": true
          },
          "xpmJobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPricingXpmJobDTO"
            },
            "nullable": true
          },
          "fyiJobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPricingFyiJobDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "engagementKey": "8f9e2b1c-3d4a-5e6f-7890-abcdef012345",
          "name": "FY25 tax engagement – Acme Pty Ltd",
          "statusName": "Accepted",
          "createBills": true,
          "servicesTotal": 2695,
          "invoicesTotal": 2695,
          "services": [
            {
              "serviceID": 12040,
              "serviceName": "Annual compliance — company",
              "price": 2450,
              "quantity": 1,
              "taxAmount": 245,
              "lineTotal": 2695
            }
          ]
        }
      },
      "Application.APIData.DataObjects.ProposalPricingXpmJobDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "templateUuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "categoryId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "budget": {
            "type": "number",
            "format": "double"
          },
          "partnerUuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "managerUuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalRenewPersonDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "surname": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalRenewPreviewResponseDTO": {
        "type": "object",
        "properties": {
          "engagementKey": {
            "type": "string",
            "format": "uuid"
          },
          "hasClientContacts": {
            "type": "boolean"
          },
          "signatoriesDiffer": {
            "type": "boolean"
          },
          "proposalSignatories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalRenewPersonDTO"
            },
            "nullable": true
          },
          "clientContacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalRenewPersonDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalRenewRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "sendToClient": {
            "type": "boolean"
          },
          "signatorySource": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "userKey": "11111111-2222-3333-4444-555555555555",
          "sendToClient": false,
          "signatorySource": "Proposal"
        }
      },
      "Application.APIData.DataObjects.ProposalXpmJobCategoryListItemDTO": {
        "type": "object",
        "properties": {
          "categoryId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "example": {
          "categoryId": "bbbbbbbb-cccc-dddd-eeee-ffffffffffff",
          "name": "Compliance",
          "isActive": true
        }
      },
      "Application.APIData.DataObjects.ProposalXpmJobTemplateListItemDTO": {
        "type": "object",
        "properties": {
          "templateUuid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "example": {
          "templateUuid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
          "name": "Individual tax return",
          "isActive": true
        }
      },
      "Application.APIData.DataObjects.ProposalXpmStaffListItemDTO": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "example": {
          "uuid": "cccccccc-dddd-eeee-ffff-000000000000",
          "name": "Jordan Lee",
          "email": "jordan.lee@practice.example",
          "isActive": true
        }
      },
      "Application.APIData.DataObjects.RecurringBillingApiDetailDTO": {
        "type": "object",
        "properties": {
          "recurringBillingID": {
            "type": "integer",
            "format": "int64"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "entityID": {
            "type": "integer",
            "format": "int32"
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "currencyID": {
            "type": "integer",
            "format": "int32"
          },
          "frequency": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "nextRunDate": {
            "type": "string",
            "format": "date"
          },
          "billAmount": {
            "type": "number",
            "format": "double"
          },
          "billTax": {
            "type": "number",
            "format": "double"
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "billDetails": {
            "type": "string",
            "nullable": true
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "brandingThemeID": {
            "type": "string",
            "nullable": true
          },
          "dueDays": {
            "type": "integer",
            "format": "int32"
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "sendBill": {
            "type": "boolean"
          },
          "billNow": {
            "type": "integer",
            "format": "int32"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time"
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.RecurringBillingApiLineItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.RecurringBillingApiLineItemDTO": {
        "type": "object",
        "properties": {
          "recurringDetailID": {
            "type": "integer",
            "format": "int64"
          },
          "billAmount": {
            "type": "number",
            "format": "double"
          },
          "billTax": {
            "type": "number",
            "format": "double"
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "narration": {
            "type": "string",
            "nullable": true
          },
          "extItemID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "extAccountID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "extTaxID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "fieldOne": {
            "type": "string",
            "nullable": true
          },
          "fieldTwo": {
            "type": "string",
            "nullable": true
          },
          "orderID": {
            "type": "integer",
            "format": "int32"
          },
          "serviceID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.RecurringBillingApiListDTO": {
        "type": "object",
        "properties": {
          "recurringBillingID": {
            "type": "integer",
            "format": "int64"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "engagementName": {
            "type": "string",
            "nullable": true
          },
          "engagementStatusID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isEngagementFinalised": {
            "type": "boolean"
          },
          "entityID": {
            "type": "integer",
            "format": "int32"
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "currencyID": {
            "type": "integer",
            "format": "int32"
          },
          "frequency": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "nextRunDate": {
            "type": "string",
            "format": "date"
          },
          "billAmount": {
            "type": "number",
            "format": "double"
          },
          "billTax": {
            "type": "number",
            "format": "double"
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "billDetails": {
            "type": "string",
            "nullable": true
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "dueDays": {
            "type": "integer",
            "format": "int32"
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "example": {
          "recurringBillingID": 88,
          "engagementID": 4501,
          "engagementName": "FY26 — Corporate tax",
          "clientName": "Acme Pty Ltd",
          "frequency": "Monthly",
          "startDate": "2026-01-01",
          "nextRunDate": "2026-08-01",
          "billTotal": 550,
          "dueDays": 14,
          "isActive": true
        }
      },
      "Application.APIData.DataObjects.RecurringBillingApiRunDTO": {
        "type": "object",
        "properties": {
          "recurringRunID": {
            "type": "integer",
            "format": "int64"
          },
          "recurringBillingID": {
            "type": "integer",
            "format": "int64"
          },
          "billingID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "runDate": {
            "type": "string",
            "format": "date"
          },
          "runOn": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "billTotal": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "billNumber": {
            "type": "string",
            "nullable": true
          },
          "externalID": {
            "type": "string",
            "nullable": true
          },
          "externalNumber": {
            "type": "string",
            "nullable": true
          },
          "externalURL": {
            "type": "string",
            "nullable": true
          },
          "paymentTotal": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "invoiceStatus": {
            "type": "string",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.RequiredDocumentApiDTO": {
        "type": "object",
        "properties": {
          "documentRequested": {
            "type": "string",
            "nullable": true
          },
          "isUploaded": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.UserCreateRequestDTO": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobileNumber": {
            "type": "string",
            "nullable": true
          },
          "roleName": {
            "type": "string",
            "nullable": true
          },
          "roleId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "enable2FA": {
            "type": "boolean"
          },
          "meetingLink": {
            "type": "string",
            "nullable": true
          },
          "baseUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.UserCreateResponseDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "isBrandNewUser": {
            "type": "boolean"
          },
          "createdMembership": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.UserListDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "userFirstName": {
            "type": "string",
            "nullable": true
          },
          "userLastName": {
            "type": "string",
            "nullable": true
          },
          "userEmail": {
            "type": "string",
            "nullable": true
          },
          "roleName": {
            "type": "string",
            "nullable": true
          },
          "userMobileNumber": {
            "type": "string",
            "nullable": true
          },
          "meetingLink": {
            "type": "string",
            "nullable": true
          },
          "hasSignature": {
            "type": "boolean"
          },
          "inactive": {
            "type": "boolean"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "userKey": "33333333-4444-5555-6666-777777777777",
          "userFirstName": "Sam",
          "userLastName": "Taylor",
          "userEmail": "sam.taylor@practice.example",
          "roleName": "Partner",
          "userMobileNumber": "+44 7700 900 123",
          "meetingLink": "https://meet.example.com/sam-taylor",
          "hasSignature": true,
          "updatedOn": "2025-03-28T16:40:00Z"
        }
      },
      "Application.APIData.DataObjects.UserUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobileNumber": {
            "type": "string",
            "nullable": true
          },
          "roleName": {
            "type": "string",
            "nullable": true
          },
          "roleId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "enable2FA": {
            "type": "boolean",
            "nullable": true
          },
          "meetingLink": {
            "type": "string",
            "nullable": true
          },
          "inactive": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.Billing.DataObjects.BillingDTO": {
        "type": "object",
        "properties": {
          "billingID": {
            "type": "integer",
            "format": "int32"
          },
          "practiceID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementName": {
            "type": "string",
            "nullable": true
          },
          "engagementStatusID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isEngagementFinalised": {
            "type": "boolean"
          },
          "entityID": {
            "type": "integer",
            "format": "int32"
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "entityEmail": {
            "type": "string",
            "nullable": true
          },
          "entityPaymentDetails": {
            "$ref": "#/components/schemas/Application.Entity.DataObjects.EntityPayerDTO"
          },
          "billDate": {
            "type": "string",
            "format": "date"
          },
          "dueDate": {
            "type": "string",
            "format": "date"
          },
          "billNumber": {
            "type": "string",
            "nullable": true
          },
          "billAmount": {
            "type": "number",
            "format": "double"
          },
          "billTax": {
            "type": "number",
            "format": "double"
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "billDetails": {
            "type": "string",
            "nullable": true
          },
          "currencyID": {
            "type": "integer",
            "format": "int32"
          },
          "paymentTotal": {
            "type": "number",
            "format": "double"
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "billNow": {
            "type": "integer",
            "format": "int32"
          },
          "syncNow": {
            "type": "boolean"
          },
          "sendBill": {
            "type": "boolean"
          },
          "invoiceIssuedSent": {
            "type": "boolean"
          },
          "invoiceIssuedLastSentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "offerPaymentPlans": {
            "type": "boolean"
          },
          "paymentPlanStatus": {
            "type": "string",
            "nullable": true
          },
          "paymentPlanOffers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.PaymentPlans.DataObjects.PaymentPlanOfferDTO"
            },
            "nullable": true
          },
          "paymentPlanOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.PaymentPlans.DataObjects.PaymentPlanOptionDTO"
            },
            "nullable": true
          },
          "billPercent": {
            "type": "integer",
            "format": "int32"
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "externalID": {
            "type": "string",
            "nullable": true
          },
          "externalNumber": {
            "type": "string",
            "nullable": true
          },
          "externalURL": {
            "type": "string",
            "nullable": true
          },
          "syncAttemptCount": {
            "type": "integer",
            "format": "int32"
          },
          "syncFailedReason": {
            "type": "string",
            "nullable": true
          },
          "externalDetails": {
            "type": "string",
            "nullable": true
          },
          "brandingThemeID": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "integer",
            "format": "int32"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "integer",
            "format": "int32"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time"
          },
          "cancelledOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "cancelledBy": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "billingDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.BillingDetails.DataObjects.BillingDetailsDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.BillingDetails.DataObjects.BillingDetailsDTO": {
        "type": "object",
        "properties": {
          "billingDetailID": {
            "type": "integer",
            "format": "int32"
          },
          "billingID": {
            "type": "integer",
            "format": "int32"
          },
          "billAmount": {
            "type": "number",
            "format": "double"
          },
          "billTax": {
            "type": "number",
            "format": "double"
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "narration": {
            "type": "string",
            "nullable": true
          },
          "extItemID": {
            "type": "integer",
            "format": "int32"
          },
          "extAccountID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "extTaxID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "fieldOne": {
            "type": "string",
            "nullable": true
          },
          "fieldTwo": {
            "type": "string",
            "nullable": true
          },
          "orderID": {
            "type": "integer",
            "format": "int32"
          },
          "serviceID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.Checklists.DataObjects.ChecklistDTO": {
        "type": "object",
        "properties": {
          "checklistId": {
            "type": "integer",
            "format": "int32"
          },
          "practiceId": {
            "type": "integer",
            "format": "int32"
          },
          "entityId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "checklistName": {
            "type": "string",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "engagementId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "engagementName": {
            "type": "string",
            "nullable": true
          },
          "typeId": {
            "type": "integer",
            "format": "int32"
          },
          "typeName": {
            "type": "string",
            "nullable": true
          },
          "statusId": {
            "type": "integer",
            "format": "int32"
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "signOffRequired": {
            "type": "boolean"
          },
          "signedOffUser": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "signedOffOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "checklistNotes": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "createdByName": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedBy": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "updatedByName": {
            "type": "string",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.Checklists.DataObjects.ChecklistDetailsDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.Checklists.DataObjects.ChecklistDetailsDTO": {
        "type": "object",
        "properties": {
          "answerId": {
            "type": "integer",
            "format": "int32"
          },
          "checklistId": {
            "type": "integer",
            "format": "int32"
          },
          "questionText": {
            "type": "string",
            "nullable": true
          },
          "questionAnswer": {
            "type": "string",
            "nullable": true
          },
          "comments": {
            "type": "string",
            "nullable": true
          },
          "questionOrder": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.EngagementDetails.DataObjects.EngagementDetailsDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementClientID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "clientRowKey": {
            "type": "string",
            "nullable": true
          },
          "serviceID": {
            "type": "integer",
            "format": "int32"
          },
          "parentServiceID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "pricingTypeDetailID": {
            "type": "integer",
            "format": "int32"
          },
          "jobTemplateID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "serviceName": {
            "type": "string",
            "nullable": true
          },
          "serviceDetail": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "rangeMin": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "rangeMax": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "taxAmount": {
            "type": "number",
            "format": "double"
          },
          "discountPerc": {
            "type": "number",
            "format": "double"
          },
          "discountAmount": {
            "type": "number",
            "format": "double"
          },
          "orderID": {
            "type": "integer",
            "format": "int32"
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "frequencyID": {
            "type": "integer",
            "format": "int32"
          },
          "designatedService": {
            "type": "boolean"
          },
          "isOptional": {
            "type": "boolean"
          },
          "optionalChosen": {
            "type": "integer",
            "format": "int32"
          },
          "subscriptionID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "frequency": {
            "type": "string",
            "nullable": true
          },
          "pricingTypeName": {
            "type": "string",
            "nullable": true
          },
          "parentServiceName": {
            "type": "string",
            "nullable": true
          },
          "customHTML": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.EngagementSignatures.DataObjects.EngagementSignatureDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32"
          },
          "orderID": {
            "type": "integer",
            "format": "int32"
          },
          "isSigned": {
            "type": "boolean"
          },
          "signature": {
            "type": "string",
            "nullable": true
          },
          "signerName": {
            "type": "string",
            "nullable": true
          },
          "signerSurname": {
            "type": "string",
            "nullable": true
          },
          "signerEmail": {
            "type": "string",
            "nullable": true
          },
          "signerMobile": {
            "type": "string",
            "nullable": true
          },
          "isOnboardingTarget": {
            "type": "boolean",
            "nullable": true
          },
          "marketing": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ipAddress": {
            "type": "string",
            "nullable": true
          },
          "termsAccepted": {
            "type": "boolean"
          },
          "signedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "integer",
            "format": "int32"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "key": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "Application.Engagements.DataObjects.EngagementClientDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32"
          },
          "entityID": {
            "type": "integer",
            "format": "int32"
          },
          "entityTypeID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "cddCaseID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "groupID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clientLinkType": {
            "$ref": "#/components/schemas/Application.Engagements.EngagementClientLinkType"
          },
          "onboardingEntityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clientRowKey": {
            "type": "string",
            "nullable": true
          },
          "mustVerify": {
            "type": "boolean"
          },
          "verificationMethod": {
            "type": "string",
            "nullable": true
          },
          "verifierSignatureKey": {
            "type": "string",
            "nullable": true
          },
          "idVerificationID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isIdVerified": {
            "type": "boolean"
          },
          "idVerificationStatusID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "isPrimaryClient": {
            "type": "boolean"
          },
          "includeEngagement": {
            "type": "boolean"
          },
          "orderID": {
            "type": "integer",
            "format": "int32"
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "clientOtherName": {
            "type": "string",
            "nullable": true
          },
          "clientSurname": {
            "type": "string",
            "nullable": true
          },
          "clientEmail": {
            "type": "string",
            "nullable": true
          },
          "clientMobile": {
            "type": "string",
            "nullable": true
          },
          "clientBusinessNo": {
            "type": "string",
            "nullable": true
          },
          "clientAddress": {
            "type": "string",
            "nullable": true
          },
          "entityPayerID": {
            "type": "string",
            "nullable": true
          },
          "clientStatus": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.Engagements.DataObjects.EngagementDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "practiceID": {
            "type": "integer",
            "format": "int32"
          },
          "lengthID": {
            "type": "integer",
            "format": "int32"
          },
          "statusID": {
            "type": "integer",
            "format": "int32"
          },
          "entityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "currencyID": {
            "type": "integer",
            "format": "int32"
          },
          "approverID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "onboardingKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "ethicalLetterKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "serviceGrouping": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sendEthicalWhen": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "startOnAcceptance": {
            "type": "boolean"
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expiryDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "requestPaymentDetails": {
            "type": "boolean"
          },
          "paymentDetailsType": {
            "type": "integer",
            "format": "int32"
          },
          "requiresApproval": {
            "type": "boolean"
          },
          "requiresMultipleAcceptance": {
            "type": "boolean"
          },
          "isNewClient": {
            "type": "boolean",
            "nullable": true
          },
          "newClientName": {
            "type": "string",
            "nullable": true
          },
          "newClientSurname": {
            "type": "string",
            "nullable": true
          },
          "newClientEmail": {
            "type": "string",
            "nullable": true
          },
          "newClientBusinessNo": {
            "type": "string",
            "nullable": true
          },
          "newClientAddress": {
            "type": "string",
            "nullable": true
          },
          "onboardAfterAcceptance": {
            "type": "boolean",
            "nullable": true
          },
          "sendEthicalLetter": {
            "type": "boolean",
            "nullable": true
          },
          "createXpmJobs": {
            "type": "boolean"
          },
          "createKarbonWorkItems": {
            "type": "boolean"
          },
          "businessSignatory": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "createFreeAgentProjects": {
            "type": "boolean"
          },
          "createGSTasks": {
            "type": "boolean"
          },
          "createFYIJobs": {
            "type": "boolean"
          },
          "createChecklist": {
            "type": "boolean"
          },
          "includeCdd": {
            "type": "boolean"
          },
          "sendForm": {
            "type": "boolean"
          },
          "formKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "onboardingSendForm": {
            "type": "boolean"
          },
          "onboardingFormKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "onboardingGroupID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "approvedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "sentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "sentBy": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "reminderCount": {
            "type": "integer",
            "format": "int32"
          },
          "createdBy": {
            "type": "integer",
            "format": "int32"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "key": {
            "type": "string",
            "format": "uuid"
          },
          "terms": {
            "type": "integer",
            "format": "int32"
          },
          "termsDetailsOverride": {
            "type": "string",
            "nullable": true
          },
          "createBills": {
            "type": "boolean"
          },
          "recurringBilling": {
            "type": "integer",
            "format": "int32"
          },
          "payerID": {
            "type": "string",
            "nullable": true
          },
          "xglClientUUID": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "currencyName": {
            "type": "string",
            "nullable": true
          },
          "sendEthicalOption": {
            "type": "string",
            "nullable": true
          },
          "baseUrl": {
            "type": "string",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "entitySurname": {
            "type": "string",
            "nullable": true
          },
          "entityMobile": {
            "type": "string",
            "nullable": true
          },
          "entityEmail": {
            "type": "string",
            "nullable": true
          },
          "welcomePDF": {
            "type": "boolean"
          },
          "pdfid": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sendSMS": {
            "type": "boolean"
          },
          "suppressClientDelivery": {
            "type": "boolean"
          },
          "stpid": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "stpDetailsOverride": {
            "type": "string",
            "nullable": true
          },
          "document1Name": {
            "type": "string",
            "nullable": true
          },
          "document1ID": {
            "type": "integer",
            "format": "int32"
          },
          "document1DetailsOverride": {
            "type": "string",
            "nullable": true
          },
          "document2Name": {
            "type": "string",
            "nullable": true
          },
          "document2ID": {
            "type": "integer",
            "format": "int32"
          },
          "document2DetailsOverride": {
            "type": "string",
            "nullable": true
          },
          "document3Name": {
            "type": "string",
            "nullable": true
          },
          "document3ID": {
            "type": "integer",
            "format": "int32"
          },
          "document3DetailsOverride": {
            "type": "string",
            "nullable": true
          },
          "document4Name": {
            "type": "string",
            "nullable": true
          },
          "document4ID": {
            "type": "integer",
            "format": "int32"
          },
          "document4DetailsOverride": {
            "type": "string",
            "nullable": true
          },
          "package1Name": {
            "type": "string",
            "nullable": true
          },
          "package1Price": {
            "type": "number",
            "format": "double"
          },
          "package2Name": {
            "type": "string",
            "nullable": true
          },
          "package2Price": {
            "type": "number",
            "format": "double"
          },
          "package3Name": {
            "type": "string",
            "nullable": true
          },
          "package3Price": {
            "type": "number",
            "format": "double"
          },
          "packageChosen": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "packageChosenBy": {
            "type": "string",
            "nullable": true
          },
          "packageText": {
            "type": "string",
            "nullable": true
          },
          "popularPackage": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "showServiceMenu": {
            "type": "boolean"
          },
          "additionalServices": {
            "type": "string",
            "nullable": true
          },
          "emailSubject": {
            "type": "string",
            "nullable": true
          },
          "emailContent": {
            "type": "string",
            "nullable": true
          },
          "packageTexts": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.EngagementDetails.DataObjects.EngagementDetailsDTO"
            },
            "nullable": true
          },
          "signatories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.EngagementSignatures.DataObjects.EngagementSignatureDTO"
            },
            "nullable": true
          },
          "xpmJobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.Integration.DataObjects.XpmJobDTO"
            },
            "nullable": true
          },
          "karbonWorkItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.Integration.DataObjects.Karbon.KarbonWorkItemDTO"
            },
            "nullable": true
          },
          "freeAgentProjects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.Integration.DataObjects.FreeAgent.FreeAgentProjectEntity"
            },
            "nullable": true
          },
          "fyiJobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.Integration.DataObjects.FYI.FyiJobDTO"
            },
            "nullable": true
          },
          "onboardingClients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.EntityOnboarding.DataObjects.EntityOnboardingInfoDTO"
            },
            "nullable": true
          },
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.Engagements.DataObjects.EngagementClientDTO"
            },
            "nullable": true
          },
          "onboardingRecipients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.OnboardingRecipient.DataObjects.OnboardingRecipientDTO"
            },
            "nullable": true
          },
          "ethicalClearance": {
            "$ref": "#/components/schemas/Application.EthicalLetters.DataObjects.EthicalLetterSaveDTO"
          },
          "form": {
            "$ref": "#/components/schemas/Application.Forms.DataObjects.FormDTO"
          },
          "onboardingForm": {
            "$ref": "#/components/schemas/Application.Forms.DataObjects.FormDTO"
          },
          "gsTasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.Integration.DataObjects.GreatSoft.GreatSoftTaskDTO"
            },
            "nullable": true
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.Billing.DataObjects.BillingDTO"
            },
            "nullable": true
          },
          "recurringBillingSetup": {
            "$ref": "#/components/schemas/Application.RecurringBilling.DataObjects.RecurringBillingDTO"
          },
          "recurringBillingSetups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.RecurringBilling.DataObjects.RecurringBillingDTO"
            },
            "nullable": true
          },
          "checklist": {
            "$ref": "#/components/schemas/Application.Checklists.DataObjects.ChecklistDTO"
          },
          "updateStep": {
            "type": "string",
            "nullable": true
          },
          "saveResponseMode": {
            "type": "string",
            "nullable": true
          },
          "saveIncompleteMessage": {
            "type": "string",
            "nullable": true
          },
          "refreshSubscriptionCounts": {
            "type": "boolean"
          },
          "coverPageID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "key": "8f9e2b1c-3d4a-5e6f-7890-abcdef012345",
          "id": 12450,
          "practiceID": 8801,
          "statusID": 3,
          "name": "FY25 — Corporate tax proposal",
          "startDate": "2025-04-01T00:00:00Z",
          "endDate": "2025-06-30T00:00:00Z",
          "expiryDate": "2025-05-15T00:00:00Z"
        }
      },
      "Application.Engagements.EngagementClientLinkType": {
        "enum": [
          0,
          1,
          2,
          3
        ],
        "type": "integer",
        "format": "int32"
      },
      "Application.Entity.DataObjects.EntityPayerDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "practiceID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "payerID": {
            "type": "string",
            "nullable": true
          },
          "bankSaved": {
            "type": "boolean",
            "nullable": true
          },
          "sourceBank": {
            "type": "string",
            "nullable": true
          },
          "sourceCard": {
            "type": "string",
            "nullable": true
          },
          "sourceCardLabel": {
            "type": "string",
            "nullable": true
          },
          "sourceBankLabel": {
            "type": "string",
            "nullable": true
          },
          "cardSaved": {
            "type": "boolean",
            "nullable": true
          },
          "cardDate": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.EntityOnboarding.DataObjects.EntityOnboardingInfoDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "entityTypeID": {
            "type": "integer",
            "format": "int32"
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "entitySurname": {
            "type": "string",
            "nullable": true
          },
          "isTaxEntity": {
            "type": "boolean"
          },
          "mustVerify": {
            "type": "boolean"
          },
          "verificationMethod": {
            "type": "string",
            "nullable": true
          },
          "requireDocs": {
            "type": "boolean"
          },
          "requiredDocs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.OnboardingDocuments.DataObjects.OnboardingDocumentCreateDTO"
            },
            "nullable": true
          },
          "entityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "entityEmail": {
            "type": "string",
            "nullable": true
          },
          "entityMobile": {
            "type": "string",
            "nullable": true
          },
          "requestAccFile": {
            "type": "boolean"
          },
          "sendForm": {
            "type": "boolean"
          },
          "accInviteName": {
            "type": "string",
            "nullable": true
          },
          "canDelete": {
            "type": "boolean"
          },
          "tempKey": {
            "type": "string",
            "nullable": true
          },
          "clientCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.EntityType.DataObjects.EntityTypeDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "countryID": {
            "type": "integer",
            "format": "int32"
          },
          "entityTypeCode": {
            "type": "string",
            "nullable": true
          },
          "entityTypeName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "id": 2,
          "countryID": 15,
          "entityTypeCode": "COMPANY",
          "entityTypeName": "Company"
        }
      },
      "Application.EthicalLetterAttachmentLink.DataObjects.EthicalLetterAttachmentLinkSaveDTO": {
        "type": "object",
        "properties": {
          "attachmentID": {
            "type": "integer",
            "format": "int64"
          },
          "sortOrder": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.EthicalLetterClients.DataObjects.EthicalLetterClientSaveDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "ethicalLetterID": {
            "type": "integer",
            "format": "int32"
          },
          "ethicalLetterKey": {
            "type": "string",
            "format": "uuid"
          },
          "entityID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementClientID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "clientRowKey": {
            "type": "string",
            "nullable": true
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "taxNumber": {
            "type": "string",
            "nullable": true
          },
          "businessNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.EthicalLetterDocuments.DataObjects.EthicalLetterDocumentSaveDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "ethicalLetterID": {
            "type": "integer",
            "format": "int32"
          },
          "documentRequested": {
            "type": "string",
            "nullable": true
          },
          "documentUploaded": {
            "type": "string",
            "nullable": true
          },
          "isUploaded": {
            "type": "boolean"
          },
          "bypassed": {
            "type": "boolean"
          },
          "bypassReason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.EthicalLetters.DataObjects.EthicalLetterSaveDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "accountantName": {
            "type": "string",
            "nullable": true
          },
          "accountantEmail": {
            "type": "string",
            "nullable": true
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "ethicalLetterDetail": {
            "type": "string",
            "nullable": true
          },
          "partnerID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "requireDocuments": {
            "type": "boolean"
          },
          "emailSubject": {
            "type": "string",
            "nullable": true
          },
          "emailContent": {
            "type": "string",
            "nullable": true
          },
          "baseURL": {
            "type": "string",
            "nullable": true
          },
          "documentRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.EthicalLetterDocuments.DataObjects.EthicalLetterDocumentSaveDTO"
            },
            "nullable": true
          },
          "selectedAttachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.EthicalLetterAttachmentLink.DataObjects.EthicalLetterAttachmentLinkSaveDTO"
            },
            "nullable": true
          },
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.EthicalLetterClients.DataObjects.EthicalLetterClientSaveDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.Forms.DataObjects.FormDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "key": {
            "type": "string",
            "format": "uuid"
          },
          "practiceID": {
            "type": "integer",
            "format": "int32"
          },
          "practiceKey": {
            "type": "string",
            "nullable": true
          },
          "entityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "statusID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "formTypeID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "stackKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "stackSortOrder": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "schema": {
            "nullable": true
          },
          "answerCount": {
            "type": "integer",
            "format": "int32"
          },
          "reminderCount": {
            "type": "integer",
            "format": "int32"
          },
          "recipientName": {
            "type": "string",
            "nullable": true
          },
          "recipientEmail": {
            "type": "string",
            "nullable": true
          },
          "recipientMobile": {
            "type": "string",
            "nullable": true
          },
          "sendSMS": {
            "type": "boolean"
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "emailSubject": {
            "type": "string",
            "nullable": true
          },
          "emailContent": {
            "type": "string",
            "nullable": true
          },
          "sentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "openedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "cancelledOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdBy": {
            "type": "integer",
            "format": "int32"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "practiceName": {
            "type": "string",
            "nullable": true
          },
          "practicePrimaryColor": {
            "type": "string",
            "nullable": true
          },
          "practiceSecondaryColor": {
            "type": "string",
            "nullable": true
          },
          "practiceCountryCode": {
            "type": "string",
            "nullable": true
          },
          "practiceDocLogoAlign": {
            "type": "string",
            "nullable": true
          },
          "practiceEmailLogoAlign": {
            "type": "string",
            "nullable": true
          },
          "practiceWebsite": {
            "type": "string",
            "nullable": true
          },
          "practiceTelephone": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.Integration.DataObjects.FYI.FyiJobDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "practiceIntegrationID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32"
          },
          "entityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "jobName": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "sourceID": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "managerEmail": {
            "type": "string",
            "nullable": true
          },
          "partnerEmail": {
            "type": "string",
            "nullable": true
          },
          "fyiTemplateID": {
            "type": "string",
            "nullable": true
          },
          "fyJobID": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.Integration.DataObjects.FreeAgent.FreeAgentProjectEntity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "integrationID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32"
          },
          "projectURL": {
            "type": "string",
            "nullable": true
          },
          "contactURL": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "contactName": {
            "type": "string",
            "nullable": true
          },
          "budget": {
            "type": "number",
            "format": "double"
          },
          "budgetUnits": {
            "type": "string",
            "nullable": true
          },
          "normalBillingRate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "hoursPerDay": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "billingPeriod": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "isIr35": {
            "type": "boolean"
          },
          "usesProjectInvoiceSequence": {
            "type": "boolean"
          },
          "includeUnbilledTimeInProfitability": {
            "type": "boolean"
          },
          "isDeletable": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "startsOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endsOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "systemCreatedOn": {
            "type": "string",
            "format": "date-time"
          },
          "systemUpdatedOn": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Application.Integration.DataObjects.GreatSoft.GreatSoftTaskDTO": {
        "type": "object",
        "properties": {
          "pkTaskID": {
            "type": "integer",
            "format": "int32"
          },
          "fkEngagementID": {
            "type": "integer",
            "format": "int32"
          },
          "entityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "allowTSE": {
            "type": "integer",
            "format": "int32"
          },
          "clientCode": {
            "type": "string",
            "nullable": true
          },
          "currCodeID": {
            "type": "string",
            "nullable": true
          },
          "groupCode": {
            "type": "string",
            "nullable": true
          },
          "officeCode": {
            "type": "string",
            "nullable": true
          },
          "servLineCode": {
            "type": "string",
            "nullable": true
          },
          "taskCode": {
            "type": "string",
            "nullable": true
          },
          "taskDesc": {
            "type": "string",
            "nullable": true
          },
          "taskDateOpen": {
            "type": "string",
            "format": "date-time"
          },
          "taskManager": {
            "type": "string",
            "nullable": true
          },
          "taskPartner": {
            "type": "string",
            "nullable": true
          },
          "billingManagerID": {
            "type": "string",
            "nullable": true
          },
          "extTaskID": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.Integration.DataObjects.Karbon.KarbonWorkItemDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "integrationID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32"
          },
          "entityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "karbonWorkTemplateID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "workTemplateKey": {
            "type": "string",
            "nullable": true
          },
          "workItemKey": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "clientKey": {
            "type": "string",
            "nullable": true
          },
          "clientType": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deadlineDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "workType": {
            "type": "string",
            "nullable": true
          },
          "primaryStatus": {
            "type": "string",
            "nullable": true
          },
          "secondaryStatus": {
            "type": "string",
            "nullable": true
          },
          "assigneeEmailAddress": {
            "type": "string",
            "nullable": true
          },
          "userRoleAssignmentsJson": {
            "type": "string",
            "nullable": true
          },
          "deployedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Application.Integration.DataObjects.XpmJobDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "integrationID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32"
          },
          "entityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "xpmID": {
            "type": "string",
            "nullable": true
          },
          "uuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "clientUUID": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "templateUUID": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "categoryID": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "refNo": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "partnerUUID": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "managerUUID": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "staffUUID": {
            "type": "string",
            "nullable": true
          },
          "budget": {
            "type": "number",
            "format": "double"
          },
          "taskIDs": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.Integration.DataObjects.XpmJobTaskDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.Integration.DataObjects.XpmJobTaskDTO": {
        "type": "object",
        "properties": {
          "jobTaskID": {
            "type": "integer",
            "format": "int32"
          },
          "taskID": {
            "type": "integer",
            "format": "int32"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "estimatedMinutes": {
            "type": "string",
            "nullable": true
          },
          "orderID": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.OnboardingDocuments.DataObjects.OnboardingDocumentCreateDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "entityOnboardingID": {
            "type": "integer",
            "format": "int32"
          },
          "documentRequested": {
            "type": "string",
            "nullable": true
          },
          "externalID": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.OnboardingRecipient.DataObjects.OnboardingRecipientDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "onboardingID": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "surname": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "sendSMS": {
            "type": "boolean"
          },
          "sendOrder": {
            "type": "integer",
            "format": "int32"
          },
          "statusID": {
            "type": "integer",
            "format": "int32"
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "sentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "openedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "submittedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "key": {
            "type": "string",
            "format": "uuid"
          },
          "signatureKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdBy": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedBy": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "entityAccess": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.OnboardingRecipientAccess.DataObjects.OnboardingRecipientAccessDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.OnboardingRecipientAccess.DataObjects.OnboardingRecipientAccessDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "recipientID": {
            "type": "integer",
            "format": "int64"
          },
          "entityOnboardingID": {
            "type": "integer",
            "format": "int32"
          },
          "canEdit": {
            "type": "boolean"
          },
          "createdBy": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.PaymentPlans.DataObjects.PaymentPlanDefinition": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "clientSummary": {
            "type": "string",
            "nullable": true
          },
          "depositType": {
            "type": "string",
            "nullable": true
          },
          "depositValue": {
            "type": "number",
            "format": "double"
          },
          "installmentCount": {
            "type": "integer",
            "format": "int32"
          },
          "targetInstallmentCents": {
            "type": "integer",
            "format": "int32"
          },
          "frequency": {
            "type": "string",
            "nullable": true
          },
          "firstInstallmentOffsetDays": {
            "type": "integer",
            "format": "int32"
          },
          "anchorDay": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "endRule": {
            "type": "string",
            "nullable": true
          },
          "minBillTotalCents": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "maxBillTotalCents": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "minInstallmentCents": {
            "type": "integer",
            "format": "int32"
          },
          "maxDurationDays": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "allowedMethods": {
            "type": "string",
            "nullable": true
          },
          "surchargeMethods": {
            "type": "string",
            "nullable": true
          },
          "maxFailures": {
            "type": "integer",
            "format": "int32"
          },
          "retryOffsetDays": {
            "type": "integer",
            "format": "int32"
          },
          "reminderDaysBefore": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.PaymentPlans.DataObjects.PaymentPlanInstallmentPreview": {
        "type": "object",
        "properties": {
          "sequence": {
            "type": "integer",
            "format": "int32"
          },
          "dueDate": {
            "type": "string",
            "format": "date"
          },
          "amountCents": {
            "type": "integer",
            "format": "int32"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "isDeposit": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.PaymentPlans.DataObjects.PaymentPlanOfferDTO": {
        "type": "object",
        "properties": {
          "planID": {
            "type": "integer",
            "format": "int32"
          },
          "isSystemPlan": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.PaymentPlans.DataObjects.PaymentPlanOptionDTO": {
        "type": "object",
        "properties": {
          "planID": {
            "type": "integer",
            "format": "int32"
          },
          "isSystem": {
            "type": "boolean"
          },
          "systemPlanID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "definition": {
            "$ref": "#/components/schemas/Application.PaymentPlans.DataObjects.PaymentPlanDefinition"
          },
          "ineligibleReason": {
            "type": "string",
            "nullable": true
          },
          "preview": {
            "$ref": "#/components/schemas/Application.PaymentPlans.DataObjects.PaymentPlanSchedulePreview"
          },
          "isEligible": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "Application.PaymentPlans.DataObjects.PaymentPlanSchedulePreview": {
        "type": "object",
        "properties": {
          "isValid": {
            "type": "boolean",
            "readOnly": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "totalCents": {
            "type": "integer",
            "format": "int32"
          },
          "depositCents": {
            "type": "integer",
            "format": "int32"
          },
          "finalDueDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "installments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.PaymentPlans.DataObjects.PaymentPlanInstallmentPreview"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.RecurringBilling.DataObjects.RecurringBillingDTO": {
        "type": "object",
        "properties": {
          "recurringBillingID": {
            "type": "integer",
            "format": "int64"
          },
          "practiceID": {
            "type": "integer",
            "format": "int32"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "entityID": {
            "type": "integer",
            "format": "int32"
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "currencyID": {
            "type": "integer",
            "format": "int32"
          },
          "frequency": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "nextRunDate": {
            "type": "string",
            "format": "date"
          },
          "billAmount": {
            "type": "number",
            "format": "double"
          },
          "billTax": {
            "type": "number",
            "format": "double"
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "billDetails": {
            "type": "string",
            "nullable": true
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "externalDetails": {
            "type": "string",
            "nullable": true
          },
          "brandingThemeID": {
            "type": "string",
            "nullable": true
          },
          "dueDays": {
            "type": "integer",
            "format": "int32"
          },
          "refNo": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "sendBill": {
            "type": "boolean"
          },
          "billNow": {
            "type": "integer",
            "format": "int32"
          },
          "isSubscriptionRecoup": {
            "type": "boolean"
          },
          "linkedEntitySubscriptionID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "createdBy": {
            "type": "integer",
            "format": "int32"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "integer",
            "format": "int32"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time"
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.RecurringBilling.DataObjects.RecurringBillingDetailDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.RecurringBilling.DataObjects.RecurringBillingDetailDTO": {
        "type": "object",
        "properties": {
          "recurringDetailID": {
            "type": "integer",
            "format": "int64"
          },
          "recurringBillingID": {
            "type": "integer",
            "format": "int64"
          },
          "billAmount": {
            "type": "number",
            "format": "double"
          },
          "billTax": {
            "type": "number",
            "format": "double"
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "narration": {
            "type": "string",
            "nullable": true
          },
          "extItemID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "extAccountID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "extTaxID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "fieldOne": {
            "type": "string",
            "nullable": true
          },
          "fieldTwo": {
            "type": "string",
            "nullable": true
          },
          "orderID": {
            "type": "integer",
            "format": "int32"
          },
          "serviceID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "entitySubscriptionID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "entitySubscriptionStatus": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "subscriptionName": {
            "type": "string",
            "nullable": true
          },
          "entityName": {
            "type": "string",
            "nullable": true
          },
          "subscriptionEntityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "xpmJobID": {
            "type": "string",
            "nullable": true
          },
          "xpmCostCode": {
            "type": "string",
            "nullable": true
          },
          "xpmUnitCost": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "xpmBillable": {
            "type": "boolean"
          },
          "xpmCostOnly": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.Role.DataObjects.RoleDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "roleName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      }
    },
    "securitySchemes": {
      "ApiClientCredentials": {
        "type": "http",
        "description": "Swagger / Postman only: **Client ID** as username, **Client secret** as password. In Postman, set this once on the **collection** (Authorization → Basic Auth) so all requests inherit. For production server-to-server code, prefer **`X-OM-Auth-ID`** and **`X-OM-Auth-Key`** headers.",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "ApiClientCredentials": [ ]
    }
  ]
}