{
  "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`**, and optionally billing the client upfront from a template bill via **`templateBillId`** — list them with **`GET /api/v1/id-verifications/template-bills`**). **`POST /api/v1/id-verifications/aml-checks`** runs a standalone **standard** or **extensive** AML screening on an existing client (`entityKey`). Downloading a verification certificate PDF (**`GET /api/v1/id-verifications/entities/{entityKey}/certificate`**) is coming soon.\r\n\r\n**Onboarding documents** — **`GET /api/v1/onboardings/{key}/documents`** lists requirements per client entity (`isUploaded` / `isBypassed`). Downloading the uploaded files (**`GET …/entities/{entityOnboardingId}/documents/{documentId}`** and **`GET …/entities/{entityOnboardingId}/documents/zip`**) is coming soon; until then these return **501**.\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. Edit an existing proposal's services with **`PATCH /api/v1/proposals/{key}/services`** (line edits) or **`PUT /api/v1/proposals/{key}/services`** (replace the list).**`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**Payments** — **`GET /api/v1/payments/list`** lists payments by payment-date range, filterable by `paymentStatus` (`processing`, `completed`, `refunded`, `failed`), `paymentMethod` (`card`, `bank`, `external`, `xero`, `quickbooks`) and `entityKey`. **`GET /api/v1/payments/{paymentId}`** loads one payment (including refund details); **`GET /api/v1/bills/{billingId}/payments`** lists every payment against a bill. Saved payment sources (card or bank account details) are never returned.\r\n\r\n**Debtors** — **`GET /api/v1/debtors/ageing`** returns outstanding receivables as at a date (practice totals plus per-client buckets: current, 1–30, 31–60, 61–90, 90+ days overdue). **`GET /api/v1/debtors/invoices`** lists outstanding invoices with days overdue, collection status and payment-plan flags. **`GET /api/v1/debtors/movement`** reconciles opening → billed → paid → closing balance over a period.\r\n\r\n**Statements** — **`GET /api/v1/statements/list?entityKey=`** lists statements sent to a client; **`GET /api/v1/statements/{statementId}`** returns the statement with its lines; **`GET /api/v1/statements/{statementId}/pdf`** downloads the statement PDF.\r\n\r\n**Signing packs** — **`GET /api/v1/signing-packs/list`** lists packs sent from the Signing page, onboardings and proposals; **`GET /api/v1/signing-packs/{packKey}`** returns the forms, people and the client/onboarding/proposal keys. Once signed, download everything as a zip with **`GET …/{packKey}/download`**, one form with **`GET …/{packKey}/forms/{formKey}/signed`**, or the certificate with **`GET …/{packKey}/certificate`**. Subscribe to **`signing_pack.signed`** to hear when a pack is signed.\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`, `signing_pack.signed`). 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/{billingId}/send": {
      "post": {
        "tags": [
          "Bills"
        ],
        "summary": "Email a bill to the client",
        "description": "Emails the bill with its PDF attached (the practice's **Invoice Issued** email, or **Payment Receipt** when it is fully paid), the same as **Send to client** in the app. Use it to send or resend.\r\n\r\n**`emails`** must be the client's email or its contacts' emails (from **GET `/api/v1/entities/{entityKey}/contacts`**); omit it to send to the client's email. Requires write access.\r\n\r\n**400:** cancelled bill, no client, an email that is not the client's, or a bill for a client still in onboarding (send that one from the app).",
        "parameters": [
          {
            "name": "billingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiBillSendRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiBillSendRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiBillSendRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiBillSendResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiBillSendResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiBillSendResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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 which ledgers are connected (**Xero**, **QuickBooks**, **GreatSoft**/MYOB, **FreeAgent**) and **`ledger`**: the one bills are pushed to (Xero, then QuickBooks, then GreatSoft).\r\n\r\nLine item rules by ledger:\r\n- **Xero**: `extTaxID` (or a `taxPercent` matching a selected rate) and an account: `extAccountID`, `extItemID`, a `serviceID` mapped to one (**`ledger/account-mappings`**), or the default revenue account (**`ledger/defaults`**). Optional `trackingOptionIDs` (up to two, **`ledger/tracking-categories`**).\r\n- **QuickBooks**: optional `extTaxID` from **`ledger/tax-rates`** (must be mapped to a QuickBooks rate).\r\n- **GreatSoft**: optional `greatSoftTaskCode` and `greatSoftAllocationCode`.\r\n- **FreeAgent** or none: no ledger fields needed.\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 tax rates",
        "description": "Returns the tax options for invoice lines: with **Xero**, the practice's selected Xero rates (with `taxType`); otherwise the country's tax options, which QuickBooks and GreatSoft map to their own codes.\r\n\r\nUse `extTaxID` on line items (bills and proposal invoices).\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/account-mappings": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List Xero service mappings",
        "description": "Returns the Xero account and/or sale item each proposal service (`serviceID`) is mapped to. A line with a mapped `serviceID` and no `extAccountID`/`extItemID` uses the mapped account (or item) automatically.\r\n\r\nEmpty when Xero is not connected.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerAccountMappingDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerAccountMappingDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerAccountMappingDTO"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bills/ledger/sale-items": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List Xero sale items",
        "description": "Returns active Xero sale items. Use `extItemID` on line items instead of an account.\r\n\r\nEmpty when Xero is not connected.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerSaleItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerSaleItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerSaleItemDTO"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bills/ledger/tracking-categories": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List Xero tracking categories",
        "description": "Returns active Xero tracking categories with their options. Send up to two `trackingOptionID` values (from different categories) in a line's `trackingOptionIDs`.\r\n\r\nEmpty when Xero is not connected.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerTrackingCategoryDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerTrackingCategoryDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerTrackingCategoryDTO"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bills/ledger/defaults": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "Ledger defaults",
        "description": "Returns the Xero **default revenue account** (`extAccountID`) used for lines with no account, item or mapped service.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerDefaultsDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerDefaultsDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerDefaultsDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bills/ledger/greatsoft-task-codes": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List GreatSoft task codes for a client",
        "description": "Returns the client's open **GreatSoft tasks** (read live from GreatSoft). Send `code` as a line's **`greatSoftTaskCode`**.\r\n\r\nEmpty when GreatSoft is not connected or the client is not linked to a GreatSoft client. **404:** unknown `entityKey`.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "query",
            "description": "Client entity key (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerGreatSoftCodeDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerGreatSoftCodeDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerGreatSoftCodeDTO"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/bills/ledger/greatsoft-allocation-codes": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List GreatSoft allocation codes",
        "description": "Returns active **GreatSoft allocation codes** (read live from GreatSoft). Send `code` as a line's **`greatSoftAllocationCode`**; when omitted the practice's default (or a FEE allocation) is used at push time.\r\n\r\nEmpty when GreatSoft is not connected.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerGreatSoftCodeDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerGreatSoftCodeDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerGreatSoftCodeDTO"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/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\nLedger fields depend on the practice's ledger (**GET `/api/v1/bills/ledger/status`** lists the rules):\r\n- **Xero**: an account (`extAccountID`, `extItemID`, a mapped `serviceID`, or the default revenue account) and `extTaxID` or a `taxPercent` matching a selected rate (±0.02%); optional `trackingOptionIDs` (up to two).\r\n- **QuickBooks**: optional `extTaxID` mapped to a QuickBooks rate. **GreatSoft**: optional `greatSoftTaskCode`, `greatSoftAllocationCode`.\r\n- Catalogues are 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}/payments": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List payments for a bill",
        "description": "Returns every payment recorded against the bill (card, bank, external, and payments imported from Xero/QuickBooks), including failed and refunded attempts.\r\n\r\nSame shape as **GET `/api/v1/payments/{paymentId}`**. Sum `appliedAmount` for the amount applied to the bill.\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": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PaymentApiDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PaymentApiDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PaymentApiDTO"
                  }
                }
              }
            }
          },
          "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",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "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/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/debtors/queue": {
      "get": {
        "tags": [
          "Debtors"
        ],
        "summary": "Debtor work queue",
        "description": "Open (unpaid) bills to chase, most overdue first, with collection status, promise-to-pay date, assignee, note count and when a reminder was last emailed or texted. Same list as the app's Debtors tab.\r\n\r\n- `assignee`: `me` (signed-in users only), `unassigned`, or a staff **`userKey`**. Omit for everyone.\r\n- `status`: New, InProgress, Contacted, PromiseToPay, BrokenPromise, Disputed or OnHold.\r\n- `bucket`: current, 30, 60, 90 or 120+ days overdue.\r\n- `overdueOnly`, `search` (client, bill number), `pageNumber`, `pageSize` (default 30, max 100).",
        "parameters": [
          {
            "name": "assignee",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bucket",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "overdueOnly",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorQueuePageDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorQueuePageDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorQueuePageDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/debtors/{billingId}/collection": {
      "put": {
        "tags": [
          "Debtors"
        ],
        "summary": "Update collection status, promise or assignee",
        "description": "Change how an unpaid bill is being chased. Send any of:\r\n\r\n- **`collectionStatus`**: New, InProgress, Contacted, PromiseToPay, BrokenPromise, Disputed or OnHold. **PromiseToPay** needs **`promiseDate`**; other statuses clear it. Disputed, OnHold and an unbroken promise pause automated reminders.\r\n- **`assignedUserKey`**: the staff member chasing it, or **`unassign: true`**.\r\n\r\nReturns the updated queue row (null when the bill is no longer an open debtor). Requires write access.",
        "parameters": [
          {
            "name": "billingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorCollectionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorCollectionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorCollectionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorQueueRowDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorQueueRowDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorQueueRowDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/debtors/{billingId}/notes": {
      "get": {
        "tags": [
          "Debtors"
        ],
        "summary": "List debtor notes",
        "description": "Follow-up notes on a bill, newest first.",
        "parameters": [
          {
            "name": "billingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorNoteDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorNoteDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorNoteDTO"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Debtors"
        ],
        "summary": "Add a debtor note",
        "description": "Adds a follow-up note to a bill (plain text; blank lines start a new paragraph). The note is recorded against the signed-in user, or the API client's creator for API keys. Requires write access.",
        "parameters": [
          {
            "name": "billingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorNoteRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorNoteRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorNoteRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorNoteDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorNoteDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorNoteDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/debtors/{billingId}/reminder-status": {
      "get": {
        "tags": [
          "Debtors"
        ],
        "summary": "Reminder status and history",
        "description": "Whether an unpaid-invoice reminder can be emailed or texted now (and why not), when each was last sent, the SMS segment count and cost, any pause reason (disputed, on hold, promise to pay, payment plan), and the reminders already sent for this bill. Check this before **POST `…/remind`**.",
        "parameters": [
          {
            "name": "billingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorReminderStatusDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorReminderStatusDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorReminderStatusDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/debtors/{billingId}/remind": {
      "post": {
        "tags": [
          "Debtors"
        ],
        "summary": "Send an unpaid-invoice reminder",
        "description": "Emails or texts the client the practice's unpaid-invoice reminder with a link to pay. **SMS is charged to the practice wallet.** Requires write access.\r\n\r\n- **409 `paused_confirmation_required`**: reminders are paused for this bill (see `pauseReason`); resend with **`confirmPaused: true`** if the user still wants to send.\r\n- **409 `recent_send_confirmation_required`**: one went out on this channel in the last 24 hours; resend with **`confirmRecent: true`**.\r\n- **200 with `outcome: skipped`**: it cannot be sent (for example no email or mobile, paid, notifications off); `code` says why.\r\n- **402 `insufficient_wallet`**: not enough wallet balance for the SMS.\r\n\r\nPass the same **`requestId`** when retrying so it never sends twice.",
        "parameters": [
          {
            "name": "billingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorRemindRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorRemindRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorRemindRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.BillingDebtors.DataObjects.DebtorSendReminderResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.BillingDebtors.DataObjects.DebtorSendReminderResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.BillingDebtors.DataObjects.DebtorSendReminderResult"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/debtors/ageing": {
      "get": {
        "tags": [
          "Debtors"
        ],
        "summary": "Debtors ageing summary",
        "description": "Returns outstanding receivables **as at** a date: practice totals plus one row per client, largest balance first.\r\n\r\nBuckets are days past due date: `current` (not yet due), `overdue1To30`, `overdue31To60`, `overdue61To90`, `overdueOver90`.\r\n\r\n`overdueArrangedTotal` is the overdue balance covered by a payment plan or scheduled payment; `overdueUnarrangedTotal` is the overdue balance with no arrangement.\r\n\r\nClient rows carry `entityKey` for active clients. Rows for onboarding (not yet converted) clients have `isOnboardingEntity = true` and no `entityKey`.\r\n\r\n`asOfDate` defaults to today in the practice time zone and cannot be more than a year in the future.\r\n\r\n**400:** Invalid `asOfDate`.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "asOfDate",
            "in": "query",
            "description": "Report date. Default today (practice time zone).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DebtorAgeingApiDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DebtorAgeingApiDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DebtorAgeingApiDTO"
                }
              }
            }
          },
          "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/debtors/invoices": {
      "get": {
        "tags": [
          "Debtors"
        ],
        "summary": "List outstanding invoices",
        "description": "Returns unpaid and part-paid bills **as at** a date, most overdue first, **100 per page**.\r\n\r\nOptional filters: `entityKey` (one client), `ageingBucket` (`current`, `1-30`, `31-60`, `61-90`, `90+`), `overdueOnly`.\r\n\r\n`collectionStatus` is the practice's collection stage (`New`, `InProgress`, `Contacted`, `PromiseToPay`, `BrokenPromise`, `Disputed`, `OnHold`); `promiseDate` is set when the client has promised to pay.\r\n\r\nUse **GET `/api/v1/bills/{billingId}`** for line items and **GET `/api/v1/bills/{billingId}/pdf`** for the invoice PDF.\r\n\r\n**400:** Invalid filters, `asOfDate` or `pageNumber`.\r\n\r\n**404:** `entityKey` not found.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "asOfDate",
            "in": "query",
            "description": "Report date. Default today (practice time zone).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "entityKey",
            "in": "query",
            "description": "Only invoices for this client entity.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ageingBucket",
            "in": "query",
            "description": "current | 1-30 | 31-60 | 61-90 | 90+.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "overdueOnly",
            "in": "query",
            "description": "Only invoices past their due date. Default false.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "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.DebtorInvoiceApiDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.DebtorInvoiceApiDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.DebtorInvoiceApiDTO"
                  }
                }
              }
            }
          },
          "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/debtors/movement": {
      "get": {
        "tags": [
          "Debtors"
        ],
        "summary": "Debtors movement",
        "description": "Reconciles the receivables balance over a period: `opening + billed - payments - cancelled + other = closing`.\r\n\r\nRows are returned at three `level`s: `practice` (one total row), `group`, and `client`.\r\n\r\n`periodStart` defaults to the first of the current month and `periodEnd` to today (practice time zone). Maximum period is 732 days.\r\n\r\n**400:** Invalid period.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "periodStart",
            "in": "query",
            "description": "Inclusive period start. Default first of current month.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "periodEnd",
            "in": "query",
            "description": "Inclusive period end. Default today.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DebtorMovementApiDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DebtorMovementApiDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.DebtorMovementApiDTO"
                }
              }
            }
          },
          "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": {
      "post": {
        "tags": [
          "eForms"
        ],
        "summary": "Create and send an eForm or eForm stack",
        "description": "Creates an eForm for a client and (by default) emails the invitation.\r\n\r\n**What to send** (one of)\r\n\r\n- **`templateId`** — from **GET `/api/v1/eforms/templates`**. Optional **`name`** renames this copy.\r\n- **`name`** + **`schema`** — a custom eForm built on the fly (see **GET `/api/v1/eforms/schema-guide`**). Staff may pre-fill `answers` on view-only questions.\r\n- **`forms[]`** — a **stack** of 2–10 eForms, each `{ templateId }` or `{ name, schema }`. The client completes them in order from one link and one email; each form is billed.\r\n\r\n**Recipient:** **`entityKey`** (existing client; name, email and mobile default from the client) and/or **`recipientName`**, **`recipientEmail`**, **`recipientMobile`**. **`sendSms`** also texts the client (needs a mobile; SMS is billed).\r\n\r\n**Options:** **`emailSubject`** / **`emailContent`** (content must include `[Link]`; defaults to the template or practice email), **`mute`** (no email, link still active), **`applyMergeFields`** (default true: pre-fills questions bound to practice, staff and client merge fields), **`sendNow`** (default true; false saves a draft to send later with **POST `/api/v1/eforms/{formKey}/send`**).\r\n\r\n**Response:** **`formKey`** (the entry form), **`stackKey`**, **`forms`**, **`sent`**, **`emailSent`**, **`accessUrl`** (client link once sent, otherwise the editor link).\r\n\r\nIf sending fails for a non-billing reason the eForms stay as drafts and **`sent`** is false. Insufficient subscription or wallet balance returns **400**. Write access is required.\r\n\r\n**429** — rate limit or daily eForm quota exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormCreateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormCreateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormCreateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/eforms/list": {
      "get": {
        "tags": [
          "eForms"
        ],
        "summary": "List eForms",
        "description": "Lists eForms sent by your practice, newest first.\r\n\r\n- `entityKey`: only eForms for this client.\r\n- `statusID`: filter by status (129 Draft, 130 Sent, 131 Opened, 134 Submitted, 135 Completed, 136 Cancelled, 163 In Stack).\r\n- `search`: free text across name and recipient.\r\n- `includeCancelled` / `includeCompleted`: cancelled are hidden by default; completed are shown.\r\n- `pageNumber` / `pageSize` (default 50, max 100). A short page means the end.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "statusID",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeCancelled",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "includeCompleted",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormListResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormListResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormListResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/eforms/{formKey}": {
      "get": {
        "tags": [
          "eForms"
        ],
        "summary": "Get an eForm with answers",
        "description": "Returns one eForm: status, recipient, dates, the full **schema with the client's answers** (`questions[].answers`, repeating sections in `sections[].instances`; answer formats are in **GET `/api/v1/eforms/schema-guide`**), and the **stack** it belongs to.\r\n\r\n**404:** Unknown key or eForm outside your practice.",
        "parameters": [
          {
            "name": "formKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormDetailDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormDetailDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormDetailDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/eforms/{formKey}/send": {
      "post": {
        "tags": [
          "eForms"
        ],
        "summary": "Send a draft eForm",
        "description": "Sends a draft created with `sendNow: false` (for a stack, pass any form in it; the whole stack is sent from its first form). Billed like a new send. Query `mute=true` skips the email.",
        "parameters": [
          {
            "name": "formKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mute",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormActionResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormActionResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormActionResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/eforms/{formKey}/resend": {
      "post": {
        "tags": [
          "eForms"
        ],
        "summary": "Resend an eForm invitation",
        "description": "Emails the invitation again for a sent or opened eForm (stack: the current form). Not billed again.",
        "parameters": [
          {
            "name": "formKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormActionResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormActionResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormActionResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/eforms/{formKey}/cancel": {
      "post": {
        "tags": [
          "eForms"
        ],
        "summary": "Cancel an eForm",
        "description": "Cancels the eForm and the unfinished forms after it in its stack. An unfinished automated ID check on a cancelled form is cancelled and refunded. Submitted or completed eForms cannot be cancelled.",
        "parameters": [
          {
            "name": "formKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormActionResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormActionResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormActionResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/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"
          }
        }
      },
      "post": {
        "tags": [
          "eForms"
        ],
        "summary": "Create an eForm template",
        "description": "Creates a practice eForm template from a **schema** (see **GET `/api/v1/eforms/schema-guide`**).\r\n\r\n**Request:** `name` (unique per practice), optional `description`, `formTypeID` (`133` External, default, or `132` Internal), `schema`, optional `emailSubject` / `emailContent` (content must include `[Link]`), `inactive`.\r\n\r\n**Response:** `templateId` and the computed `questionCount`. Write access is required.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateUpsertRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateUpsertRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateUpsertRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateSaveResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateSaveResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateSaveResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/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/eforms/schema-guide": {
      "get": {
        "tags": [
          "eForms"
        ],
        "summary": "eForm schema guide",
        "description": "Describes how to build an eForm **schema**: every question type with its answer format and allowed conditional operators, `clientAccess` values, merge fields, ID verification methods, and a complete example schema.\r\n\r\n**Schema rules**\r\n\r\n- `sections[]`: `{ id, title, description, order, conditional?, repeating?, settings? }`. The first section cannot be conditional or repeating.\r\n- `questions[]` (flat list): `{ id, sectionId, order, type, label, description?, required?, clientAccess? (editable | viewOnly | internal), sensitive?, mergeField?, allowFileUpload?, options?, settings?, conditional?, itemQuestions?, sharedDocuments? }`.\r\n- `conditional`: `{ dependsOn: <questionId>, operator, value }`. A question can depend on an earlier question in the same section; a section on a question in an earlier section. Never on an internal question.\r\n- Repeating sections cannot contain signature, ID verification or repeating group questions, or merge fields.\r\n- At most one `automated_identity_verification` question per eForm.\r\n\r\nMissing defaults (`order`, `required`, `clientAccess`, `options`, `answers`) are filled in. Invalid schemas return **400** listing the problems.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormSchemaGuideDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormSchemaGuideDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormSchemaGuideDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/eforms/templates/{templateId}": {
      "get": {
        "tags": [
          "eForms"
        ],
        "summary": "Get an eForm template",
        "description": "Returns one template with its full **schema**. **`isStandard`** marks shared OnboardMe templates; updating one saves a practice copy.\r\n\r\n**404:** Unknown template or not available to your practice.",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateDetailDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateDetailDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateDetailDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "eForms"
        ],
        "summary": "Update an eForm template",
        "description": "Replaces a template's name, description, type, schema, email and active flag (same body as create).\r\n\r\nStandard OnboardMe templates are never changed: the practice's own copy is created or updated instead and **`savedAsPracticeCopy`** is **true** with the copy's **`templateId`**.\r\n\r\nForms already sent are not affected. Write access is required.",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateUpsertRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateUpsertRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateUpsertRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateSaveResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateSaveResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateSaveResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "eForms"
        ],
        "summary": "Deactivate an eForm template",
        "description": "Marks the template inactive so it is no longer offered (a standard template is hidden for your practice only). Reactivate by updating it with `inactive: false`.",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/eforms/templates/{templateId}/duplicate": {
      "post": {
        "tags": [
          "eForms"
        ],
        "summary": "Duplicate an eForm template",
        "description": "Copies a template (yours or a standard one) as a new practice template named \"<name> (copy)\". Returns the new **`templateId`**.",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateSaveResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateSaveResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormTemplateSaveResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/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/entities/external-system-ids": {
      "patch": {
        "tags": [
          "Entities"
        ],
        "summary": "Set or clear external system IDs on many clients",
        "description": "Sets `externalSystemID` on up to 500 clients in one call, matched by `entityKey`. Only the external system ID changes; nothing else on the client is touched. Requires an API client with **write** access.\r\n\r\n- `externalSystemID`: the new value (trimmed, max 100 characters). `null`, empty or omitted **clears** it.\r\n- An external system ID is unique within the practice (case-insensitive). Swapping values between clients in the same request is allowed.\r\n- Each item succeeds or fails on its own; changed clients get a new `updatedOn`, so `GET /api/v1/entities/list?lastUpdated=` picks them up.\r\n\r\n**Example**\r\n\r\n```json\r\n{\r\n  \"items\": [\r\n    { \"entityKey\": \"3f6c1a52-8d4e-4a7b-9c11-2b7f0e5d9a10\", \"externalSystemID\": \"CRM-10045\" },\r\n    { \"entityKey\": \"a1b2c3d4-0000-4000-8000-000000000001\", \"externalSystemID\": null }\r\n  ]\r\n}\r\n```\r\n\r\n**Result `status` per item:** `updated`, `unchanged`, `invalid` (bad key, repeated key or too long), `notFound` (no client with that key in your practice), `duplicate` (same value sent for two clients), `conflict` (value already used by another client).\r\n\r\n**400:** No items, or more than 500.\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.EntityExternalIdsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityExternalIdsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityExternalIdsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityExternalIdsUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityExternalIdsUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityExternalIdsUpdateResponseDTO"
                }
              }
            }
          },
          "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/entities/{entityKey}/payment-link": {
      "post": {
        "tags": [
          "Entities"
        ],
        "summary": "Get a payment portal link for a client",
        "description": "Returns the link without emailing it, for you to share. **`portalTab`**: payments (default), bills, proposals, eforms or dashboard.\r\nThe link opens the client's payment portal, where they can pay outstanding bills and save a card or bank account. It is valid for 14 days. The practice must use Pinch, Stripe or Apxium; the client is set up in the payment provider first if needed. Requires write access.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiPaymentLinkRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiPaymentLinkRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiPaymentLinkRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiPaymentLinkResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiPaymentLinkResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiPaymentLinkResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/entities/{entityKey}/payment-link/send": {
      "post": {
        "tags": [
          "Entities"
        ],
        "summary": "Email a payment portal link to a client",
        "description": "Emails the practice's **Payment Portal Link** email to the client's email address.\r\nThe link opens the client's payment portal, where they can pay outstanding bills and save a card or bank account. It is valid for 14 days. The practice must use Pinch, Stripe or Apxium; the client is set up in the payment provider first if needed. Requires write access.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiPaymentLinkRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiPaymentLinkRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiPaymentLinkRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiPaymentLinkResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiPaymentLinkResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiPaymentLinkResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/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\n**Bill upfront**\r\n\r\n- Set **`templateBillId`** (from **`GET /api/v1/id-verifications/template-bills`**) to make the client pay before they can verify. Requires **`entityKey`**.\r\n- The bill is raised from the template when the client opens the link, then paid by card or bank account through the practice's payment provider (Pinch or Stripe must be connected).\r\n- Only active, one-off template bills can be used. Invoices marked **Bill now** are billed; if none are marked, the first invoice is.\r\n- **`upfrontBill`** in the response gives the template name, **`amountDue`** (incl. tax) and **`invoiceCount`**; **null** when no upfront bill was requested.\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\n**AML billing (`aml` in the response)** — what was actually consumed; **null** when the invite has no AML.\r\n\r\n- **`aml.requestsRequired`** — AML requests needed (**Basic** = 1, **Extensive** = 2).\r\n- **`aml.fromSubscription`** — requests taken from the practice's subscription.\r\n- **`aml.purchasedFromWallet`** / **`aml.walletCharge`** — requests beyond the subscription balance, billed at the add-request price.\r\n- **`aml.subscriptionRemaining`** — subscription requests left after this send.\r\n- **`aml.waived`** — **true** when AML charges are waived for the practice.\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/template-bills": {
      "get": {
        "tags": [
          "ID verifications"
        ],
        "summary": "List template bills for upfront billing",
        "description": "Lists the practice's active, one-off template bills. Pass a **`templateBillId`** to **`POST /api/v1/id-verifications/send`** so the client pays before verifying.\r\n\r\nRecurring template bills are not listed because they cannot be billed upfront.\r\n\r\n**`search`** (optional) filters by template name.\r\n\r\n**429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Filter by template name.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.IdVerificationTemplateBillDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.IdVerificationTemplateBillDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.IdVerificationTemplateBillDTO"
                  }
                }
              }
            }
          },
          "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/entities/{entityKey}/certificate": {
      "get": {
        "tags": [
          "ID verifications"
        ],
        "summary": "Download identity verification certificate PDF (coming soon)",
        "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\nFor **Annature** verifications this returns Annature's own certificate of verification, fetched from Annature at request time; **404** until Annature has issued it.\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",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "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/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\n**`aml`** in the response reports what was consumed (**`requestsRequired`**, **`fromSubscription`**, **`purchasedFromWallet`**, **`walletCharge`**, **`subscriptionRemaining`**, **`waived`**). Standard = 1 request, extensive = 2, monitoring adds 1.\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\nIf a lead with the same name, surname and email already exists, that lead is returned and any note is added to it.\r\n\r\n**400:** Validation failed, or a client (not a lead) with the same name, surname and email already exists.\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/notifications": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "summary": "List unread notifications",
        "description": "Unread in-app notifications for one user in your practice, newest first: proposals accepted, declined or awaiting approval, onboardings submitted or awaiting approval, client notes, eForms submitted, ID verifications completed, clearance responses and statement sends.\r\n\r\nEach item has a readable **`message`**, the related **`proposalKey`** / **`onboardingKey`** / **`formKey`** (or **`entityKey`** for ID verification) and **`appUrl`**, a staff link that opens the record in OnboardMe. **`unreadCount`** is the total before **`limit`** (default 50, max 200).\r\nNotifications belong to a staff user. A signed-in (OAuth) caller always gets their own; **`userKey`** may be omitted or must be their own key. An API key must pass **`userKey`** (from **GET `/api/v1/users/list`**) to choose the user.",
        "parameters": [
          {
            "name": "userKey",
            "in": "query",
            "description": "User whose notifications to list. Required for API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum items to return (1-200, default 50).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationListDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationListDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationListDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/notifications/{notificationId}/read": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "summary": "Mark a notification as read",
        "description": "Marks one notification as read. Marking one that is already read is fine. Requires write access.\n\n**404:** Not one of this user's notifications in your practice.\r\nNotifications belong to a staff user. A signed-in (OAuth) caller always gets their own; **`userKey`** may be omitted or must be their own key. An API key must pass **`userKey`** (from **GET `/api/v1/users/list`**) to choose the user.",
        "parameters": [
          {
            "name": "notificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userKey",
            "in": "query",
            "description": "User the notification belongs to. Required for API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationReadResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationReadResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationReadResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/notifications/read-all": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "summary": "Mark all notifications as read",
        "description": "Marks every unread notification for the user in your practice as read and returns how many changed. Pass **`upToNotificationId`** (the newest id you listed) so notifications that arrived since stay unread. Requires write access.\r\nNotifications belong to a staff user. A signed-in (OAuth) caller always gets their own; **`userKey`** may be omitted or must be their own key. An API key must pass **`userKey`** (from **GET `/api/v1/users/list`**) to choose the user.",
        "parameters": [
          {
            "name": "userKey",
            "in": "query",
            "description": "User whose notifications to mark. Required for API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationMarkAllRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationMarkAllRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationMarkAllRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationMarkAllResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationMarkAllResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationMarkAllResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/offices/list": {
      "get": {
        "tags": [
          "Offices"
        ],
        "summary": "List offices",
        "description": "Returns your practice's offices, ordered by name. Use **`officeId`** to assign users to an office\r\n(**PUT `/api/v1/users/{userKey}`** or **POST `/api/v1/users/office`**).\r\n\r\nInactive offices are left out unless **`includeInactive=true`**. Users can stay in an office after it is\r\nmade inactive, but cannot be newly assigned to one.\r\n\r\nOffices synced from GreatSoft carry the GreatSoft office code in **`officeCode`**. Office codes are unique\r\nwithin a practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "includeInactive",
            "in": "query",
            "description": "When true, inactive offices are included.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeDTO"
                  }
                }
              }
            }
          },
          "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/offices/{officeId}": {
      "get": {
        "tags": [
          "Offices"
        ],
        "summary": "Get an office",
        "description": "Returns one office for your practice, active or inactive.\r\n\r\n**404:** Office not found for your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "description": "Office ID from GET /api/v1/offices/list.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeDTO"
                }
              }
            }
          },
          "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": [
          "Offices"
        ],
        "summary": "Update an office",
        "description": "Updates an office. Only supplied fields change; send an empty string to clear an optional field.\r\n\r\nOnly **Owners and Admins** can update offices.\r\n\r\nSet **`inactive`: false** to reactivate an office (or `true` to make it inactive, same as\r\n**POST `…/inactivate`**).\r\n\r\nFor practices connected to GreatSoft, the next GreatSoft sync sets the name and code of synced\r\noffices back to the GreatSoft values.\r\n\r\nRequires an API client with **write** access.\r\n\r\n**403:** API client is read-only, or the signed-in user is not an Owner or Admin.\r\n\r\n**404:** Office not found for your practice.\r\n\r\n**409:** Another office already has this name or code.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "description": "Office ID from GET /api/v1/offices/list.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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/offices": {
      "post": {
        "tags": [
          "Offices"
        ],
        "summary": "Create an office",
        "description": "Creates an office for your practice. **`officeName`** is required; everything else is optional.\r\n\r\nOnly **Owners and Admins** can create offices.\r\n\r\nOffice names and codes must be unique within the practice (inactive offices included).\r\n\r\nRequires an API client with **write** access.\r\n\r\n**201:** Body is the created office, including **`officeId`**.\r\n\r\n**409:** Another office already has this name or code.\r\n\r\n**403:** API client is read-only, or the signed-in user is not an Owner or Admin.\r\n\r\n**429:** Rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeCreateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeCreateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeCreateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOfficeDTO"
                }
              }
            }
          },
          "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/offices/{officeId}/inactivate": {
      "post": {
        "tags": [
          "Offices"
        ],
        "summary": "Make an office inactive",
        "description": "Only **Owners and Admins** can make an office inactive.\r\n\r\nHides the office from office pickers. Users already in the office keep it; reactivate with\r\n**PUT `/api/v1/offices/{officeId}`** and `inactive: false`.\r\n\r\nRequires an API client with **write** access.\r\n\r\n**403:** API client is read-only, or the signed-in user is not an Owner or Admin.\r\n\r\n**404:** Office not found for your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "officeId",
            "in": "path",
            "description": "Office ID from GET /api/v1/offices/list.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "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/onboardings/{key}/send": {
      "post": {
        "tags": [
          "Onboarding actions"
        ],
        "summary": "Send an onboarding",
        "description": "- **Draft** (or **Pending Proposal** once its proposal is accepted): sends the invitation to the first recipient. Subscription, wallet, identity-verification, AML and SMS costs are checked and charged as in the app; **400** explains a shortfall and nothing is sent.\r\n- **Sent / Opened / Awaiting Additional Recipients**: sends it again to the current recipient (SMS charged when enabled).\r\n- **Ready for Approval**: use **`…/approve`**.\r\n\r\n**`aml`** in the response reports the AML requests for the clients' ID checks: **`requestsRequired`** (Enhanced = 1, Comprehensive = 2 per client), **`fromSubscription`**, **`purchasedFromWallet`**, **`walletCharge`**, **`subscriptionRemaining`** and **`waived`**. **null** when nothing AML-related was billed (no AML, a resend, or AML already billed with the linked proposal).\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/bulk-resend": {
      "post": {
        "tags": [
          "Onboarding actions"
        ],
        "summary": "Resend onboardings",
        "description": "Sends up to 100 onboardings again (**`onboardingKeys`**). Only Sent, Opened and Awaiting Additional Recipients onboardings are resent; the response lists each result.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingBulkResendRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingBulkResendRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingBulkResendRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/send-for-approval": {
      "post": {
        "tags": [
          "Onboarding actions"
        ],
        "summary": "Send an onboarding for approval",
        "description": "Draft only. **`approverUserKey`** (or the approver already set) receives it; they approve and send with **`…/approve`**.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/approve": {
      "post": {
        "tags": [
          "Onboarding actions"
        ],
        "summary": "Approve and send an onboarding",
        "description": "Ready for Approval only; **`userKey`** must be the approver. Sends to the first recipient with the same charges as **`…/send`**, and returns the same **`aml`** billing summary.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/cancel": {
      "post": {
        "tags": [
          "Onboarding actions"
        ],
        "summary": "Cancel an onboarding",
        "description": "The recipient's link stops working, in-flight ID checks are cancelled and unused charges are refunded as in the app.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/complete": {
      "post": {
        "tags": [
          "Onboarding actions"
        ],
        "summary": "Complete an onboarding",
        "description": "Saves every client to the practice (creating or updating client records, contacts, custom fields and verification), marks the onboarding **Completed**, then pushes the clients and their documents to connected systems (XPM, GreatSoft, Karbon, FYI, KloudConnect) in the background. **`idOnly`** clients are saved as **Associated** contacts and are not pushed.\r\n\r\nAllowed once sent (Sent, Opened, Awaiting Additional Recipients, Submitted). Optional **`engagementKey`** links the clients to a proposal.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/reset-reminders": {
      "post": {
        "tags": [
          "Onboarding actions"
        ],
        "summary": "Reset onboarding reminders",
        "description": "Restarts the reminder schedule (Sent, Opened, Awaiting Additional Recipients). Uses one onboarding request (subscription, then wallet) as in the app.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/pause-reminders": {
      "post": {
        "tags": [
          "Onboarding actions"
        ],
        "summary": "Pause or resume onboarding reminders",
        "description": "**`paused`**: true pauses automatic reminders, false resumes them.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/clients/{clientId}/push-to-client": {
      "post": {
        "tags": [
          "Onboarding actions"
        ],
        "summary": "Update the practice client from an onboarding client",
        "description": "Copies the details collected for this onboarding client (and its contacts and custom fields) into the linked practice client, and syncs connected systems. The onboarding client must be linked to a practice client.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/recipients/{recipientKey}/send": {
      "post": {
        "tags": [
          "Onboarding actions"
        ],
        "summary": "Send to a specific recipient",
        "description": "Sends (or resends) the onboarding to this recipient, for example after adding one. SMS is charged when enabled.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recipientKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/statuses": {
      "get": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "List onboarding statuses",
        "description": "Status names an onboarding moves through, in order.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/clients": {
      "get": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "List onboarding clients",
        "description": "Clients on the onboarding with their `clientID` (entityOnboardingId), settings and documents.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Replace onboarding clients",
        "description": "**`clients`** items: same fields as **POST `/api/v1/onboardings/create`** `clients[]` (`entityKey` or `entityType`/`entityTypeId` + `name`/`surname`, `email`, `mobile`, `clientCode`, `requireTaxDetails`, `identityVerification` + `verificationMethod`, `idOnly`, `requireDocuments` + `documents`, `requestAccountingFileAccess`, `accountingFileInviteName`) plus **`id`** (clientID) for an existing client.\r\n\r\n- On an existing client only the fields sent change. **`documents`** (when sent) becomes the requested documents; documents already uploaded are always kept.\r\n- New clients are visible to **`recipientKeys`** (or every recipient when omitted). A new **`idOnly`** client instead goes to the recipient with their email, or to a new recipient of their own (email required).\r\n- On a sent onboarding, changing identity checks charges or refunds the difference, as in the app.\n\n**PUT** — the list is the onboarding's clients: clients left out are **removed** with their documents.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Edit onboarding clients",
        "description": "**`clients`** items: same fields as **POST `/api/v1/onboardings/create`** `clients[]` (`entityKey` or `entityType`/`entityTypeId` + `name`/`surname`, `email`, `mobile`, `clientCode`, `requireTaxDetails`, `identityVerification` + `verificationMethod`, `idOnly`, `requireDocuments` + `documents`, `requestAccountingFileAccess`, `accountingFileInviteName`) plus **`id`** (clientID) for an existing client.\r\n\r\n- On an existing client only the fields sent change. **`documents`** (when sent) becomes the requested documents; documents already uploaded are always kept.\r\n- New clients are visible to **`recipientKeys`** (or every recipient when omitted). A new **`idOnly`** client instead goes to the recipient with their email, or to a new recipient of their own (email required).\r\n- On a sent onboarding, changing identity checks charges or refunds the difference, as in the app.\n\n**PATCH** — items with `id` are edited, `{id, remove: true}` removes, items without `id` are added; other clients are unchanged.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/clients/{clientId}": {
      "get": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Get an onboarding client",
        "description": "All details collected for one client, with documents, contacts and custom fields.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/recipients": {
      "get": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "List onboarding recipients",
        "description": "Recipients in send order with `recipientKey`, status and which clients each can see (`access`).",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Replace onboarding recipients",
        "description": "**`recipients`** items: `recipientKey` (existing), `name`, `surname`, `email`, `mobile`, `sendSms`, and **`access`** `[{ entityOnboardingId, canEdit }]` (clients this recipient sees; new recipients see every client except **`idOnly`** ones when omitted). Recipients who have already submitted cannot be changed or removed. At least one recipient is required.\n\n**PUT** — recipients left out are **removed**.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRecipientsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRecipientsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRecipientsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Edit onboarding recipients",
        "description": "**`recipients`** items: `recipientKey` (existing), `name`, `surname`, `email`, `mobile`, `sendSms`, and **`access`** `[{ entityOnboardingId, canEdit }]` (clients this recipient sees; new recipients see every client except **`idOnly`** ones when omitted). Recipients who have already submitted cannot be changed or removed. At least one recipient is required.\n\n**PATCH** — `recipientKey` edits (only fields sent change), `{recipientKey, remove: true}` removes, no key adds.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRecipientsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRecipientsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRecipientsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/clients/{clientId}/contacts": {
      "get": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "List client contacts",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Add a client contact",
        "description": "`name`/`surname` (one required), `salutation`, `addressee`, `email`, `mobile`, `telephone`, `position`, `isPrimary`.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingContactRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingContactRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingContactRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/notes": {
      "get": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "List onboarding notes",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Add an onboarding note",
        "description": "**`text`**; **`notifyClient`**: true emails the current recipient about the note.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingNoteRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingNoteRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingNoteRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/relationships": {
      "get": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "List client relationships",
        "description": "The clients' existing relationships (outside clients by name) plus the ones added on this onboarding, which are written to the clients on complete.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Replace client relationships",
        "description": "**`relationships`** `[{ fromClientID, toClientID, relationshipTypeID, from?, to?, number?, percentage? }]` between clients on this onboarding; replaces the relationships added on this onboarding (existing ones are untouched).\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRelationshipsRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRelationshipsRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRelationshipsRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/details": {
      "patch": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Edit onboarding details",
        "description": "**`emailSubject`**, **`emailContent`** (invitation email) and **`groupID`** (0 clears). Only the fields sent change.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDetailsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDetailsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDetailsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/clients/{clientId}/details": {
      "patch": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Fill in client details",
        "description": "Sets details collected for the client on their behalf (for example `entityTaxNumber`, `entityBirthDate`, `address1`, `entityTelephone`). **`fields`** uses the property names from **GET `…/clients/{clientId}`**; only those sent change. Settings, links, keys and verification cannot be set here.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientDetailsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientDetailsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientDetailsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/clients/{clientId}/documents": {
      "post": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Request a document",
        "description": "Adds a requested document (**`name`**) for the client.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentRequirementDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentRequirementDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentRequirementDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/documents/{documentId}": {
      "patch": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Rename or bypass a document",
        "description": "**`name`** renames it; **`bypassed`** + optional **`bypassReason`** (100 characters) marks it as not needed.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentChangeDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentChangeDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingDocumentChangeDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Remove a requested document",
        "description": "Removes a requested document that has no uploaded file (delete the file first). **`userKey`** in the query string.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userKey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/documents/{documentId}/file": {
      "post": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Upload a document file",
        "description": "Uploads the file for a requested document on the client's behalf (multipart: **`file`**, **`userKey`**). Replaces an existing upload. Allowed file types and size limits are the app's.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "userKey": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "userKey": {
                  "style": "form"
                },
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Delete an uploaded document file",
        "description": "Removes the uploaded file; the document stays requested. **`userKey`** in the query string.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userKey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/clients/{clientId}/contacts/{contactId}": {
      "patch": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Edit a client contact",
        "description": "Only the fields sent change.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingContactRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingContactRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingContactRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Remove a client contact",
        "description": "**`userKey`** in the query string.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "userKey",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/onboardings/{key}/clients/{clientId}/custom-fields": {
      "put": {
        "tags": [
          "Onboarding management"
        ],
        "summary": "Set client custom fields",
        "description": "**`fields`** `[{ customFieldID, value }]` for custom fields offered to this client (see **GET `…/clients/{clientId}`** `customFields`). Empty `value` clears it; fields not sent are unchanged.\r\n**`userKey`** — staff member taking the action (**GET `/api/v1/users/list`**). Cancelled and completed onboardings cannot be changed.\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingCustomFieldsRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingCustomFieldsRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingCustomFieldsRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/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- **`idOnly`** — **true** marks an associated person (director, beneficial owner, trustee...) who only confirms their details and completes ID verification: no documents, bank, billing or terms. Individual only; implies **`identityVerification`** (set **`verificationMethod`**); leave **`requireTaxDetails`**, **`requireDocuments`** and **`requestAccountingFileAccess`** off. Each **`idOnly`** client needs an **`email`** and gets their own recipient link, unless their email is the **`recipient`** email. On completion they are saved as an **Associated** contact and never pushed to integrations.\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 from wallet; AML screening (Enhanced = 1 request, Comprehensive = 2 per client) from the subscription first, then wallet at the add-request price; SMS from wallet when **`sendSms`** is set. Promotional free-verification rules apply where configured.\r\n\r\n**`aml`** in the response reports what AML billing consumed (**`requestsRequired`**, **`fromSubscription`**, **`purchasedFromWallet`**, **`walletCharge`**, **`subscriptionRemaining`**, **`waived`**); **null** when not sent or no client has AML.\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 (coming soon)**: both routes return **501** for now.\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 (coming soon)",
        "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**413:** More than 200 files or more than 200 MB of files; download them individually instead.\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",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "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/{documentId}": {
      "get": {
        "tags": [
          "Onboardings"
        ],
        "summary": "Get a signed download URL for one onboarding document (coming soon)",
        "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/payments/list": {
      "get": {
        "tags": [
          "Payments"
        ],
        "summary": "List payments",
        "description": "Returns payments received against bills for your practice, newest first, **50 per page**.\r\n\r\nThe date range matches on payment date or processed date (inclusive). Maximum range is 366 days.\r\n\r\nOptional filters:\r\n- `searchFilter` — client name, payment reference, bill number, ledger invoice number or payment number\r\n- `paymentStatus` — `processing` (bank debit submitted), `completed`, `refunded`, `failed`\r\n- `paymentMethod` — `card`, `bank` (direct debit), `external` (recorded manually), `xero` / `quickbooks` (imported from the ledger)\r\n- `entityKey` — only payments for this client (from **GET `/api/v1/entities`**)\r\n\r\nEach payment links back to its bill (`billingId`, `billNumber`, `externalInvoiceNumber`). `amount` is what the client paid; `appliedAmount` is what was applied to the bill (0 for failed or refunded payments). `fee` is the processing fee where known.\r\n\r\nSaved payment sources (card or bank account details) are **never** returned.\r\n\r\n**400:** Missing/invalid dates, filters or `pageNumber`.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "description": "Inclusive start of payment-date range (required).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Inclusive end of payment-date range (required).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "searchFilter",
            "in": "query",
            "description": "Free-text search (client name, payment reference, bill/invoice/payment number).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentStatus",
            "in": "query",
            "description": "processing | completed | refunded | failed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentMethod",
            "in": "query",
            "description": "card | bank | external | xero | quickbooks.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityKey",
            "in": "query",
            "description": "Only payments for this client entity.",
            "schema": {
              "type": "string"
            }
          },
          {
            "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.PaymentApiDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PaymentApiDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.PaymentApiDTO"
                  }
                }
              }
            }
          },
          "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/payments/{paymentId}": {
      "get": {
        "tags": [
          "Payments"
        ],
        "summary": "Load a payment",
        "description": "Returns a single payment, including refund details when it has been refunded.\r\n\r\n**404:** Unknown `paymentId` or payment outside your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "paymentId",
            "in": "path",
            "description": "Payment id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.PaymentApiDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.PaymentApiDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.PaymentApiDTO"
                }
              }
            }
          },
          "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/{key}/send": {
      "post": {
        "tags": [
          "Proposal actions"
        ],
        "summary": "Send a proposal",
        "description": "- **New** proposal: sends it to the client by email (and SMS when enabled), or to the approver when it requires approval.\r\n- **Sent / Opened / Awaiting additional acceptances**: sends it again with the same link.\r\n\r\nSending may use subscription credits or wallet funds as in the app (for example onboarding or eForm requests); **400** explains when the wallet is short.\r\n\r\n**`aml`** in the response reports the AML requests for the clients' ID checks (including a linked onboarding's clients): **`requestsRequired`** (Enhanced = 1, Comprehensive = 2 per client), **`fromSubscription`**, **`purchasedFromWallet`**, **`walletCharge`**, **`subscriptionRemaining`** and **`waived`**. **null** when nothing AML-related was billed (no AML, or a resend).\r\n**Request** — **`userKey`**: staff member taking the action (**GET `/api/v1/users/list`**).\r\n\r\n**Response** — `engagementKey`, the new `statusName` and a `message`. Write access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/approve": {
      "post": {
        "tags": [
          "Proposal actions"
        ],
        "summary": "Approve and send a proposal",
        "description": "Approves a proposal **awaiting approval** and sends it to the client. **`userKey`** must be the proposal's approver. Returns the same **`aml`** billing summary as **`…/send`**.\r\n**Request** — **`userKey`**: staff member taking the action (**GET `/api/v1/users/list`**).\r\n\r\n**Response** — `engagementKey`, the new `statusName` and a `message`. Write access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/cancel": {
      "post": {
        "tags": [
          "Proposal actions"
        ],
        "summary": "Cancel a proposal",
        "description": "Cancels the proposal; the client's link stops working. Completed and renewed proposals cannot be cancelled.\r\n**Request** — **`userKey`**: staff member taking the action (**GET `/api/v1/users/list`**).\r\n\r\n**Response** — `engagementKey`, the new `statusName` and a `message`. Write access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/reactivate": {
      "post": {
        "tags": [
          "Proposal actions"
        ],
        "summary": "Reactivate a declined proposal",
        "description": "Turns a **declined** proposal back into a new draft so it can be edited and sent again.\r\n**Request** — **`userKey`**: staff member taking the action (**GET `/api/v1/users/list`**).\r\n\r\n**Response** — `engagementKey`, the new `statusName` and a `message`. Write access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/mark-accepted": {
      "post": {
        "tags": [
          "Proposal actions"
        ],
        "summary": "Mark a proposal accepted",
        "description": "Records acceptance on the client's behalf (for example a signed paper copy). Runs the same acceptance steps as the app (billing, jobs, onboarding). **`packageChosen`** (1–3) for multi-package proposals.\r\n**Request** — **`userKey`**: staff member taking the action (**GET `/api/v1/users/list`**).\r\n\r\n**Response** — `engagementKey`, the new `statusName` and a `message`. Write access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/mark-completed": {
      "post": {
        "tags": [
          "Proposal actions"
        ],
        "summary": "Mark a proposal completed",
        "description": "Marks the work complete. Bills set to be issued on completion are created (and pushed to Xero when connected; see `billOnCompletionPush`). **`packageChosen`** (1–3) for multi-package proposals.\r\n**Request** — **`userKey`**: staff member taking the action (**GET `/api/v1/users/list`**).\r\n\r\n**Response** — `engagementKey`, the new `statusName` and a `message`. Write access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/reset-reminders": {
      "post": {
        "tags": [
          "Proposal actions"
        ],
        "summary": "Reset proposal reminders",
        "description": "Resets the automatic reminder count so the client receives the reminder schedule again.\r\n**Request** — **`userKey`**: staff member taking the action (**GET `/api/v1/users/list`**).\r\n\r\n**Response** — `engagementKey`, the new `statusName` and a `message`. Write access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalActionResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}": {
      "put": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Replace a proposal",
        "description": "Replaces the whole proposal with the body you send — the same body as **POST `/api/v1/proposals`** (without `entityKey` changes or `sendToClient`). **Every section is replaced: anything you do not send is removed** (jobs, invoices, eForm, checklist, documents…). Signatories are only replaced when you send them.\r\n\r\nItems with **`id`** keep that item (services, invoices, recurring billings, jobs); use this to keep items already pushed to another system.\r\n\r\nRuns the step updates in order (services, details, signatories, billing, XPM, FYI, Karbon, GreatSoft, FreeAgent, eForm, checklist). It is not one transaction: if a step fails, the error names it and earlier steps stay saved.\r\n\r\nOnboarding, identity verification and ethical letters cannot be changed through the API yet.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "description": "Proposal key.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "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.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "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}/details": {
      "put": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Replace proposal details",
        "description": "Replaces the proposal's settings: `name` (required), `startDate`, `endDate`, `startOnAcceptance`, `lengthID`, `currencyID`, `expiryDate`, `terms` + `termsDetailsOverride`, `stpID` + `stpDetailsOverride`, `documents` (up to 4), `attachmentID`, `coverPageID`, `note` or `welcomeMessageID`, `emailSubject` + `emailContent`, `packages`, `popularPackage`, `showServiceMenu`, `serviceGrouping`, `sendSms`, `requestPaymentDetails` + `paymentDetailsType`, `businessSignatoryUserKey`, `requiresApproval` + `approverUserKey`, `includeCdd`.\r\n\r\n**Fields you do not send go back to their defaults** (practice default terms, no documents, default email, length 12 months, and so on), exactly as on create. `payerID` only changes when sent. Use PATCH to change a few fields.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalDetailsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalDetailsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalDetailsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Edit proposal details",
        "description": "Changes only the settings you send (same fields as **PUT `…/details`**). A list you send (`documents`, `packages`) replaces that list. Empty values are ignored; use PUT to clear a setting.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalDetailsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalDetailsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalDetailsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/signatories": {
      "put": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Replace signatories",
        "description": "**`signatories`** — `{ id?, name, surname, email, mobile? }`, at least one, at most 10. The first is the primary signatory; an existing primary signatory must stay first.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalSignatoriesUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalSignatoriesUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalSignatoriesUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Edit signatories",
        "description": "**`signatories`** — `{ id?, remove?, name, surname, email, mobile? }`.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalSignatoriesUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalSignatoriesUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalSignatoriesUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/services": {
      "put": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Replace services",
        "description": "**`services`** — at least one line, in display order. Same shape as **POST `/api/v1/proposals`** `services`, plus optional **`id`** (`services[].id` from **GET `/api/v1/proposals/{key}/pricing`**): with `id` the line is kept and only the fields you send change; without `id` a line is added from **`serviceID`**. Lines left out are removed. A sub-service line can only be kept with its parent.\r\n\r\n**`billingNeedsReview`** is true when the proposal has invoices or recurring billing, which are not recalculated from service prices; update them with **`…/billing`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalServicesReplaceRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalServicesReplaceRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalServicesReplaceRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Edit services",
        "description": "- **`services`** — line edits. Identify each line by **`id`** or by **`serviceID`** (plus **`packageNumber`** when the service is in more than one package). Optional: `price`, `quantity`, `taxAmount` (percent), `discountPerc`, `discountAmount`, `isOptional`, `moveToPackageNumber` (1–3), `serviceDetail` (HTML). **`remove`: true** removes the line and its sub-service lines.\r\n- **`addServices`** — new lines, same shape as **POST `/api/v1/proposals`** `services`.\r\n\r\nLines you do not mention are unchanged. **`billingNeedsReview`** as for PUT.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalServicesPatchRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalServicesPatchRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalServicesPatchRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/billing": {
      "put": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Replace billing",
        "description": "- **`invoices`** — `{ id?, billDate, dueDate, billNow 0/1/2, lineItems[{amount, narration, taxAmount or taxPercent, extAccountID?, extItemID?, extTaxID?}], billDetails?, refNo?, sendBill?, syncNow?, brandingThemeID?, packageNumber? }`.\r\n- **`recurringBillings`** — `{ id?, frequency, startDate, lineItems, endDate?, nextRunDate?, dueDays?, billNow 0/2, … }`.\r\n- or **`billFromServices`** — `{ billNow 0/1/2, packageNumber?, billDate?, dueDate?, recurringSchedules? }` rebuilds billing from the current services (kept: synced/paid invoices and subscription schedules).\r\n\r\nSending no invoices and no recurring billings turns billing off. Line ids are not kept: sending `lineItems` replaces an invoice's lines.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalBillingUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalBillingUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalBillingUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Edit billing",
        "description": "**`invoices`** and **`recurringBillings`** item edits (fields as PUT `…/billing`).\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalBillingUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalBillingUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalBillingUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/xpm-jobs": {
      "put": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Replace XPM jobs",
        "description": "**`xpmJobs`** — `{ id?, name, templateUuid (xpm-job-templates), categoryId? (xpm-job-categories), description?, startDate?, dueDate?, refNo?, budget?, partnerUuid?, managerUuid?, staffUuids[]? (xpm-staff), tasks[{ taskID (xpm-tasks), label?, description?, startDate?, dueDate?, estimatedMinutes? }] }`. Sending `tasks` replaces the job's tasks. Requires XPM.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmJobsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmJobsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmJobsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Edit XPM jobs",
        "description": "**`xpmJobs`** — `{ id?, name, templateUuid (xpm-job-templates), categoryId? (xpm-job-categories), description?, startDate?, dueDate?, refNo?, budget?, partnerUuid?, managerUuid?, staffUuids[]? (xpm-staff), tasks[{ taskID (xpm-tasks), label?, description?, startDate?, dueDate?, estimatedMinutes? }] }`. Sending `tasks` replaces the job's tasks. Requires XPM.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmJobsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmJobsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmJobsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/fyi-jobs": {
      "put": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Replace FYI jobs",
        "description": "**`fyiJobs`** — `{ id?, jobName, fyiTemplateId? (fyi-job-templates), state? (fyi-job-states), type?, startDate?, dueDate?, managerEmail, partnerEmail, sourceID? }`. Requires FYI Elite.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFyiJobsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFyiJobsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFyiJobsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Edit FYI jobs",
        "description": "**`fyiJobs`** — `{ id?, jobName, fyiTemplateId? (fyi-job-templates), state? (fyi-job-states), type?, startDate?, dueDate?, managerEmail, partnerEmail, sourceID? }`. Requires FYI Elite.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFyiJobsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFyiJobsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFyiJobsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/karbon-work-items": {
      "put": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Replace Karbon work items",
        "description": "**`karbonWorkItems`** — `{ id?, workTemplateKey (karbon-work-templates), title?, description?, startDate?, dueDate?, deadlineDate?, primaryStatus?, secondaryStatus? (karbon-work-statuses), assigneeEmail? (karbon-users) }`, at most 20. Requires Karbon.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonWorkItemsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonWorkItemsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonWorkItemsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Edit Karbon work items",
        "description": "**`karbonWorkItems`** — `{ id?, workTemplateKey (karbon-work-templates), title?, description?, startDate?, dueDate?, deadlineDate?, primaryStatus?, secondaryStatus? (karbon-work-statuses), assigneeEmail? (karbon-users) }`, at most 20. Requires Karbon.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonWorkItemsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonWorkItemsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonWorkItemsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/greatsoft-tasks": {
      "put": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Replace GreatSoft tasks",
        "description": "**`greatSoftTasks`** — `{ id?, stdTaskID (greatsoft-std-tasks), officeCode? (greatsoft-offices), managerCode?, partnerCode?, billingManagerGuid? (greatsoft-staff), currencyCode? (greatsoft-currencies), dateOpen? }`, at most 20. Requires GreatSoft.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftTasksUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftTasksUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftTasksUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Edit GreatSoft tasks",
        "description": "**`greatSoftTasks`** — `{ id?, stdTaskID (greatsoft-std-tasks), officeCode? (greatsoft-offices), managerCode?, partnerCode?, billingManagerGuid? (greatsoft-staff), currencyCode? (greatsoft-currencies), dateOpen? }`, at most 20. Requires GreatSoft.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftTasksUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftTasksUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftTasksUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/freeagent-projects": {
      "put": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Replace FreeAgent projects",
        "description": "**`freeAgentProjects`** — `{ id?, name, budget?, budgetUnits? (Hours/Days/Months), normalBillingRate?, hoursPerDay?, billingPeriod? (hour/day/month), currency? (3 letters), isIr35?, includeUnbilledTimeInProfitability?, startsOn?, endsOn? }`, at most 20. Requires FreeAgent.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFreeAgentProjectsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFreeAgentProjectsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFreeAgentProjectsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Edit FreeAgent projects",
        "description": "**`freeAgentProjects`** — `{ id?, name, budget?, budgetUnits? (Hours/Days/Months), normalBillingRate?, hoursPerDay?, billingPeriod? (hour/day/month), currency? (3 letters), isIr35?, includeUnbilledTimeInProfitability?, startsOn?, endsOn? }`, at most 20. Requires FreeAgent.\r\n**PUT** replaces the list: send every item to keep, in order. An item with **`id`** keeps that item and changes only the fields you send; an item without `id` is added. Items left out are removed; `[]` removes them all.\r\n\r\n**PATCH** changes only the items you send: with **`id`** to edit (only the fields you send change), **`id` + `remove: true`** to remove, without `id` to add.\r\n\r\nItem ids come from **GET `/api/v1/proposals/{key}`**.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFreeAgentProjectsUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFreeAgentProjectsUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalFreeAgentProjectsUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/eform": {
      "put": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Set the proposal's client eForms",
        "description": "**`eForms`** — one eForm per proposal client: **`clientKey`** (a client on the proposal), **`formTemplateID`** (**GET `/api/v1/eforms/templates`**; omit to keep that client's current eForm and only change who completes it) and **`signatoryEmail`** (the proposal signatory who completes it). Clients left out lose their eForm; **`[]`** removes all. On a proposal already sent, each added form uses an eForm credit, charged to its client.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalEFormUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalEFormUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalEFormUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/{key}/checklist": {
      "put": {
        "tags": [
          "Proposal updates"
        ],
        "summary": "Set the proposal checklist",
        "description": "**`checklist`** — `{ templateID (checklist-templates), signOffRequired?, signOffUserKey?, notes? }`; **null** turns the checklist off. Answers already given are kept.\r\n**Rules for every update route**\r\n\r\n- **`userKey`** — staff member making the change (**GET `/api/v1/users/list`**).\r\n- Field names, lookups and validation are the same as **POST `/api/v1/proposals`**.\r\n- Accepted, completed, due-for-renewal and renewed proposals cannot be edited.\r\n- Editing a proposal that has already been sent changes what the client sees.\r\n- Items already pushed to another system (XPM, FYI, Karbon, GreatSoft, FreeAgent), signed signatories, and invoices that are synced, paid or cancelled cannot be changed or removed. In a PUT, include them as `{ \"id\": … }` to keep them.\r\n- **Response**: `pricing` (services, invoices, recurring billing, jobs) and `section` (this step as saved, with ids).\r\n\r\nWrite access is required. **429** — rate limit exceeded.",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalChecklistUpdateRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalChecklistUpdateRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalChecklistUpdateRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalUpdateResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/terms": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List terms and conditions templates",
        "description": "Returns the **terms and conditions** templates available to your practice: your own templates plus OnboardMe standard templates for your country. Use **`id`** as **`terms`** on **POST `/api/v1/proposals`**.\r\n\r\n**`isPracticeDefault`** marks the template used when **`terms`** is omitted.\r\n\r\nRead a template's content with **GET `/api/v1/proposals/terms/{termsId}`**; create and edit templates with **POST** / **PUT** on the same routes.\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.ProposalTermsListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalTermsListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalTermsListItemDTO"
                  }
                }
              }
            }
          },
          "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": [
          "Proposals"
        ],
        "summary": "Create a terms template",
        "description": "Creates a practice terms template (see **GET `/api/v1/proposals/terms/format-guide`**).\r\n\r\n**Request:** `name` (max 100 characters), `content` (HTML, max 64 KB), optional `active` (default true).\r\n\r\nScripts, iframes, forms, event handlers and `javascript:` links are removed. **`unknownMergeFields`** lists `[bracketed]` text that is not a merge field; it is saved and stays as plain text in proposals.\r\n\r\n**Response:** the new **`termsId`**. Use it as **`terms`** on **POST `/api/v1/proposals`**. Write access is required.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateUpsertRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateUpsertRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateUpsertRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateSaveResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateSaveResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateSaveResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/stp-authorities": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List STP authority templates",
        "description": "Returns the **Single Touch Payroll (STP) authority** templates available to your practice (Australian practices). Use **`id`** as **`stpID`** on **POST `/api/v1/proposals`**.\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.ProposalOptionItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              }
            }
          },
          "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/documents": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List additional proposal documents",
        "description": "Returns **additional documents** (for example privacy statements or client charters) that can be included in a proposal. Use **`id`** as **`documents[].documentID`** on **POST `/api/v1/proposals`** (up to four).\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.ProposalOptionItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              }
            }
          },
          "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/attachments": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List proposal PDF attachments",
        "description": "Returns the **PDF attachments** uploaded for your practice. Use **`id`** as **`attachmentID`** on **POST `/api/v1/proposals`** to attach one to the proposal.\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.ProposalOptionItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              }
            }
          },
          "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/cover-pages": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List proposal cover pages",
        "description": "Returns the **cover pages** designed for your practice. Use **`id`** as **`coverPageID`** on **POST `/api/v1/proposals`**.\r\n**`isPracticeDefault`** marks the cover used when `coverPageID` is omitted.\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.ProposalOptionItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              }
            }
          },
          "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/welcome-messages": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List welcome message templates",
        "description": "Returns saved **welcome message** templates (HTML). Use **`id`** as **`welcomeMessageID`** on **POST `/api/v1/proposals`**, or send your own HTML in **`note`**.\r\n**`isPracticeDefault`** marks the message used when neither `note` nor `welcomeMessageID` is sent.\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.ProposalWelcomeMessageListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalWelcomeMessageListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalWelcomeMessageListItemDTO"
                  }
                }
              }
            }
          },
          "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/lengths": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List engagement lengths",
        "description": "Returns the **engagement length** options. Use **`id`** as **`lengthID`** on **POST `/api/v1/proposals`**. With the **Custom** length, set **`endDate`** yourself.\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.ProposalLookupValueDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalLookupValueDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalLookupValueDTO"
                  }
                }
              }
            }
          },
          "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/currencies": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List proposal currencies",
        "description": "Returns the **currencies** a proposal can be priced in. Use **`id`** as **`currencyID`** on **POST `/api/v1/proposals`**.\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.ProposalLookupValueDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalLookupValueDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalLookupValueDTO"
                  }
                }
              }
            }
          },
          "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/approvers": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List proposal approvers for a user",
        "description": "Returns who can approve proposals created by **`userKey`** (the same **`userKey`** you send on **POST `/api/v1/proposals`**).\r\n\r\n- **`approvalEnforced`** — the practice requires approval for this user; **`requiresApproval`** is forced on and **`approverUserKey`** must be one of **`approvers`** (the first is used when omitted).\r\n- **`selfApprover`** — the user approves their own proposals; approval is off unless requested.\r\n- Otherwise **`approvers`** lists all other staff and approval is optional.\r\n\r\n**404:** Unknown **`userKey`**.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "userKey",
            "in": "query",
            "description": "Staff member creating the proposal (userKey from GET /api/v1/users/list).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalApproversResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalApproversResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalApproversResponseDTO"
                }
              }
            }
          },
          "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/checklist-templates": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List checklist templates",
        "description": "Returns active **checklist templates**. Use **`id`** as **`checklistTemplateID`** on **POST `/api/v1/proposals`**.\r\n\r\n- `pageNumber`: 1-based page (default **1**). A short page means the end.\r\n- `search`: optional partial match on the template name.\r\n\r\n**400:** Invalid `pageNumber`.\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": "search",
            "in": "query",
            "description": "Filter template names (contains match).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalChecklistTemplateListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalChecklistTemplateListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalChecklistTemplateListItemDTO"
                  }
                }
              }
            }
          },
          "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/checklist-templates/{templateId}": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "Get a checklist template",
        "description": "Returns one active **checklist template** with its **questions** in order, so you can see what a proposal checklist will contain before setting **`checklist.templateID`**.\r\n\r\n**404:** Template not found or not available to your practice.",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalChecklistTemplateDetailDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalChecklistTemplateDetailDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalChecklistTemplateDetailDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/verification-methods": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List identity verification methods",
        "description": "Returns the **identity verification methods** (for example Basic, Standard, Enhanced, Comprehensive, Annature). Send **`name`** as **`verificationMethod`** on **POST `/api/v1/proposals`**, `identityPeople[].verificationMethod`, and onboarding clients.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalLookupValueDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalLookupValueDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalLookupValueDTO"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/service-frequencies": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List service frequencies",
        "description": "Returns the **service billing frequencies** (for example Monthly, Quarterly, Annually). Each service in **GET `/api/v1/proposals/services`** carries its frequency.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalLookupValueDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalLookupValueDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalLookupValueDTO"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/ethical-letter-document-presets": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List ethical letter document presets",
        "description": "Returns the practice's saved **document requirement presets** for ethical (professional clearance) letters. Send the **`name`** values in **`ethicalLetter.documentRequirements`** on **POST `/api/v1/proposals`**.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/ethical-letter-templates": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List ethical letter templates",
        "description": "Returns **ethical (professional) clearance letter** templates. Use **`id`** as **`ethicalLetter.templateID`** on **POST `/api/v1/proposals`**.\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.ProposalOptionItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalOptionItemDTO"
                  }
                }
              }
            }
          },
          "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/karbon-work-templates": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List Karbon work templates",
        "description": "Returns **Karbon work templates** synced for your practice. Use **`workTemplateKey`** on **POST `/api/v1/proposals`** `karbonWorkItems`.\r\n\r\nReturns an empty list when Karbon 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.ProposalKarbonWorkTemplateListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonWorkTemplateListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonWorkTemplateListItemDTO"
                  }
                }
              }
            }
          },
          "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/karbon-users": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List Karbon users",
        "description": "Returns active **Karbon users**. Use **`email`** as **`assigneeEmail`** on **POST `/api/v1/proposals`** `karbonWorkItems`.\r\n\r\nReturns an empty list when Karbon 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.ProposalKarbonUserListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonUserListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonUserListItemDTO"
                  }
                }
              }
            }
          },
          "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/karbon-work-statuses": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List Karbon work statuses for a work template",
        "description": "Returns the **primary** and **secondary** statuses for the work type of **`workTemplateKey`**. Send **`value`** as **`primaryStatus`** or **`secondaryStatus`** on **POST `/api/v1/proposals`** `karbonWorkItems`, matching **`kind`**.\r\n\r\nReturns an empty list when Karbon is not connected.\r\n\r\n**400:** Missing or unknown `workTemplateKey`.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "workTemplateKey",
            "in": "query",
            "description": "workTemplateKey from GET /api/v1/proposals/karbon-work-templates.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonWorkStatusListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonWorkStatusListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalKarbonWorkStatusListItemDTO"
                  }
                }
              }
            }
          },
          "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/greatsoft-std-tasks": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List GreatSoft standard tasks",
        "description": "Returns **GreatSoft standard tasks**. Use **`id`** as **`stdTaskID`** on **POST `/api/v1/proposals`** `greatSoftTasks`.\r\n\r\nReturns an empty list when GreatSoft 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.ProposalGreatSoftStdTaskListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftStdTaskListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftStdTaskListItemDTO"
                  }
                }
              }
            }
          },
          "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/greatsoft-offices": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List GreatSoft offices",
        "description": "Returns **GreatSoft offices**. Use **`officeCode`** on **POST `/api/v1/proposals`** `greatSoftTasks` (the first office is used when omitted).\r\n\r\nReturns an empty list when GreatSoft 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.ProposalGreatSoftOfficeListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftOfficeListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftOfficeListItemDTO"
                  }
                }
              }
            }
          },
          "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/greatsoft-staff": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List GreatSoft staff",
        "description": "Returns active **GreatSoft staff**. Use **`code`** as **`managerCode`** / **`partnerCode`** and **`guid`** as **`billingManagerGuid`** on **POST `/api/v1/proposals`** `greatSoftTasks` (the first staff member is used when omitted).\r\n\r\nReturns an empty list when GreatSoft 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.ProposalGreatSoftStaffListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftStaffListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftStaffListItemDTO"
                  }
                }
              }
            }
          },
          "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/greatsoft-currencies": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List GreatSoft currencies",
        "description": "Returns **GreatSoft currencies**. Use **`currencyCode`** on **POST `/api/v1/proposals`** `greatSoftTasks`; when omitted, the currency linked to the proposal **`currencyID`** is used.\r\n\r\nReturns an empty list when GreatSoft 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.ProposalGreatSoftCurrencyListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftCurrencyListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalGreatSoftCurrencyListItemDTO"
                  }
                }
              }
            }
          },
          "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/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/templates/{templateId}/duplicate": {
      "post": {
        "tags": [
          "Proposals"
        ],
        "summary": "Duplicate a proposal template",
        "description": "Copies one of your practice's proposal templates, with all its settings, as a new active template named \"<name> - copy\". Returns the new **`templateId`**.\r\n\r\n**400:** A template with the copy's name already exists.\r\n\r\n**404:** Unknown template or not one of your practice's.",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "templateId from GET /api/v1/proposals/templates.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementTemplateListItemDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementTemplateListItemDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.EngagementTemplateListItemDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "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-tasks": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List XPM tasks",
        "description": "Returns the **Xero Practice Manager task catalogue** synced for your practice. Use **`taskID`** in **`xpmJobs[].tasks[]`** on **POST `/api/v1/proposals`** and the XPM job update routes.\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.ProposalXpmTaskListItemDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmTaskListItemDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalXpmTaskListItemDTO"
                  }
                }
              }
            }
          },
          "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",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "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- **`pricingMode`** — **`Keep`** (default, copy prices as-is), **`Master`** (reset each service to its current service catalogue price; discounts are kept) or **`Increase`** (raise every price by **`increasePercent`**, rounded to the nearest whole dollar). Package prices are re-totalled from the services and billing amounts are scaled to match.\r\n- **`increasePercent`** — required when **`pricingMode`** is **`Increase`**; greater than 0 and no more than 100.\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- **`pricingMode`** / **`increasePercent`** — same as duplicate: **`Keep`** (default), **`Master`** or **`Increase`**.\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`). It is the **primary** client.\r\n- **`groupID`** (optional) — a client group (**GET `/api/v1/groups/list`**). Every active member is added as a proposal client after the primary, like picking a group in the app. Terminated members are skipped.\r\n- **`clientKeys`** (optional) — more existing clients (`entityKey` values) to add to the proposal.\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 proposal is named **`<template name> – <client display name>`**.\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}`**). It is the **primary** client.\r\n- **`groupID`** (optional) — a client group (**GET `/api/v1/groups/list`**). Every active member is added as a proposal client after the primary, like picking a group in the app. Terminated members are skipped.\r\n- **`clientKeys`** (optional) — more existing clients (`entityKey` values) to add to the proposal.\r\n- **`name`** — proposal name. The API always appends **` – <client display name>`**, so do not include the client's name (send `Individual Tax Return`, not `Individual Tax Return - Jane Smith`).\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`. Ledger fields as for **POST `/api/v1/bills`** (`extAccountID`, `extItemID`, `extTaxID`, `trackingOptionIDs`, `greatSoftTaskCode`, `greatSoftAllocationCode`), validated for the practice's ledger. **`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- **`billFromServices`** — optional, instead of `invoices` / `recurringBillings`. Builds billing from the services the same way the app does: once-off and annual services share one invoice; weekly, fortnightly, monthly and quarterly services become recurring schedules (set **`recurringSchedules`: false** to bill them as invoices). **`billNow`**: `0` neither, `1` upfront, `2` on completion (recurring schedules accept `0` or `2`; upfront becomes `0`). Optional `packageNumber` (required when services use several packages), `billDate` (default today), `dueDate` (default from the practice payment terms), `sendBill`. Ledger accounts and items are not auto-mapped; send `invoices` with ledger ids when you need them.\r\n- **`requestPaymentDetails`** — when **true**, collect payment method on acceptance. **`paymentDetailsType`**: `0` all (default), `1` card, `2` bank account. **`payerID`** links an existing Pinch payer or Stripe customer.\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. A person who is already a proposal client (from `groupID` / `clientKeys`) is verified on that client row instead of being added again.\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\n**Proposal documents and appearance**\r\n\r\n- **`terms`** — terms template id (**GET `/api/v1/proposals/terms`**; the practice default is used when omitted). Optional **`termsDetailsOverride`** (HTML) replaces the template text for this proposal.\r\n- **`stpID`** — STP authority (**GET `/api/v1/proposals/stp-authorities`**), optional **`stpDetailsOverride`** (HTML).\r\n- **`documents`** — up to four `{ documentID, detailsOverride }` (**GET `/api/v1/proposals/documents`**).\r\n- **`attachmentID`** — PDF attachment (**GET `/api/v1/proposals/attachments`**). **`coverPageID`** — cover page (**GET `/api/v1/proposals/cover-pages`**).\r\n- **`note`** (HTML welcome message) or **`welcomeMessageID`** (**GET `/api/v1/proposals/welcome-messages`**), not both.\r\n- **`emailSubject`** / **`emailContent`** — custom proposal email (HTML). The content must include the **`[Link]`** placeholder or an `<a href>`; subject up to 150 characters.\r\n- **`packages`** — `{ packageNumber (1–3), name, price, text }` for packages used by `services[].packageNumber`. **`popularPackage`**, **`showServiceMenu`**, **`serviceGrouping`** (`0` by frequency, `1` none, `2` by client, `3` by client then frequency).\r\n- **`lengthID`** (**GET `/api/v1/proposals/lengths`**) and **`currencyID`** (**GET `/api/v1/proposals/currencies`**) are validated.\r\n\r\n**People and approval**\r\n\r\n- **`signatories`** — any number of `{ name, surname, email, mobile }`. Omit to use the client's previous signatories or primary contact. Several signatories turn on multiple acceptance.\r\n- **`businessSignatoryUserKey`** — staff member who signs for the practice (default: **`userKey`**).\r\n- **`requiresApproval`** / **`approverUserKey`** — see **GET `/api/v1/proposals/approvers?userKey=`**. When the practice enforces approval for **`userKey`**, approval is always on and the approver must come from that list.\r\n- **`includeCdd`** — include customer due diligence.\r\n\r\n**Forms, letters, checklists and work items**\r\n\r\n- **`eForms`** — one eForm per proposal client, sent with the proposal: **`[{ clientKey, formTemplateID, signatoryEmail }]`** (templates from **GET `/api/v1/eforms/templates`**; **`clientKey`** is **`entityKey`** or one of **`clientKeys`**; **`signatoryEmail`** is one of **`signatories`**). Not with **`onboarding`**; **`onboarding.groupID`** assigns the onboarding to a group (**GET `/api/v1/groups/list`**).\r\n- **`ethicalLetter`** — professional clearance letter: **`templateID`** (**GET `/api/v1/proposals/ethical-letter-templates`**) or **`detail`** (HTML), **`sendWhen`** `89` after acceptance (default) or `90` with the proposal, **`accountantName`** / **`accountantEmail`** (previous accountant; required for `90`), optional **`partnerUserKey`**, **`requireDocuments`** and **`documentRequirements`** (defaults to the practice document templates). Merge fields such as `[ClientName]`, `[AccountantName]`, `[TodaysDate]`, `[RequestorName]` and `[PartnerName]` are filled in.\r\n- **`checklist`** — **`templateID`** (**GET `/api/v1/proposals/checklist-templates`**), **`signOffRequired`**, **`signOffUserKey`**, **`notes`**.\r\n- **`karbonWorkItems`** — `{ workTemplateKey, title, description, startDate, dueDate, deadlineDate, primaryStatus, secondaryStatus, assigneeEmail }` (**GET `/api/v1/proposals/karbon-work-templates`**, **`karbon-users`**, **`karbon-work-statuses`**). Karbon must be connected.\r\n- **`greatSoftTasks`** — `{ stdTaskID, officeCode, managerCode, partnerCode, billingManagerGuid, currencyCode, dateOpen }` (**GET `/api/v1/proposals/greatsoft-std-tasks`**, **`greatsoft-offices`**, **`greatsoft-staff`**, **`greatsoft-currencies`**). GreatSoft must be connected.\r\n- **`freeAgentProjects`** — `{ name, budget, budgetUnits (Hours/Days/Months), normalBillingRate, hoursPerDay, billingPeriod (hour/day/month), currency, isIr35, includeUnbilledTimeInProfitability, startsOn, endsOn }`. FreeAgent must be connected.\r\n\r\nOther optional header fields: `startDate`, `endDate`, `startOnAcceptance`, `refNo`, `expiryDate`, `sendSms`.\r\n\r\nEvery id is checked against your practice; unknown or inactive ids return **400** naming the lookup route to use.\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/proposals/services/import-options": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "Service import options",
        "description": "The values **POST `/api/v1/proposals/services/import`** accepts for your practice: service types (based on your industry), pricing models, billing frequencies, common tax rates for your country, limits and matching rules.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ServiceImportOptionsDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ServiceImportOptionsDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ServiceImportOptionsDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/services/import": {
      "post": {
        "tags": [
          "Proposals"
        ],
        "summary": "Import services",
        "description": "Creates or updates up to 500 services in one call, like the Services import spreadsheet.\r\n\r\n**Request:** `services[]` of `{ name, description?, serviceType, pricingModel, frequency, price?, rangeMin?, rangeMax?, taxPercent, includeInMenu? }` using names from **GET `/api/v1/proposals/services/import-options`**, and `dryRun` (default false).\r\n\r\n**Matching:** a name matching one of your services (ignoring case and extra spaces) updates it; a name matching a standard OnboardMe catalogue service creates your own copy (`customize`); anything else is created. Updates change only the imported fields.\r\n\r\n**Response:** per-row `operation`, `serviceId`, `success` and `errors`, plus totals. Rows with errors are skipped; valid rows are still saved. With `dryRun` nothing is saved. Write access is required.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ServiceImportRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ServiceImportRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.ServiceImportRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ServiceImportResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ServiceImportResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ServiceImportResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/terms/format-guide": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "Terms template format guide",
        "description": "Describes how to write terms template **content**: the HTML the editor and PDF support, layout tokens (`[Section:…]`, `[PAGEBREAK]`), signature blocks (`[SIGNATURE:Signer]`, `[SIGNATURE:Business]`), client input fields (`[Input:type:Label]`), every merge field, and a complete example.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsFormatGuideDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsFormatGuideDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsFormatGuideDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/terms/{termsId}": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "Get a terms template",
        "description": "Returns one terms template with its HTML **content**. **`isStandard`** marks shared OnboardMe templates; updating one saves a practice copy.\r\n\r\n**404:** Unknown template or not available to your practice.",
        "parameters": [
          {
            "name": "termsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateDetailDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateDetailDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateDetailDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Proposals"
        ],
        "summary": "Update a terms template",
        "description": "Replaces a template's name and content (same body as create). `active` keeps its current value when omitted.\r\n\r\nStandard OnboardMe templates are never changed: a practice copy is created instead, **`savedAsPracticeCopy`** is **true** and **`termsId`** is the copy. The copy needs a different name from the standard template.\r\n\r\nProposals already created keep the terms they were sent with. Write access is required.",
        "parameters": [
          {
            "name": "termsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateUpsertRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateUpsertRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateUpsertRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateSaveResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateSaveResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateSaveResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Proposals"
        ],
        "summary": "Deactivate a terms template",
        "description": "Marks one of your practice's templates inactive so it is no longer offered on new proposals. Reactivate by updating it with `active: true`.\r\n\r\n**400:** Standard templates and the practice's default terms template cannot be deactivated.",
        "parameters": [
          {
            "name": "termsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proposals/terms/{termsId}/duplicate": {
      "post": {
        "tags": [
          "Proposals"
        ],
        "summary": "Duplicate a terms template",
        "description": "Copies a template (yours or a standard one) as a new active practice template named \"<name> (copy)\". Returns the new **`termsId`**.",
        "parameters": [
          {
            "name": "termsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateSaveResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateSaveResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsTemplateSaveResponseDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/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/signing-packs/list": {
      "get": {
        "tags": [
          "Signing packs"
        ],
        "summary": "List signing packs",
        "description": "Returns signing packs your practice has sent (from the Signing page, onboardings and proposals), newest first, 50 per page.\r\nA shorter page means the last page.\r\n\r\nFilters:\r\n- `searchTerm`: matches the pack name, company name, form name or form code.\r\n- `source`: `Direct` (Signing page), `Onboarding` or `Proposal`.\r\n- `status`: `Sent`, `Opened`, `Part Signed`, `All Signed` (everyone has signed; the signed copies are still being stored), `Signed`, `Completed` (staff marked it done) or `Cancelled`.\r\n- `includeCancelled` / `includeCompleted`: hidden by default unless `status` asks for them.\r\n\r\nList rows leave out `people` and the client, onboarding and proposal keys; load **GET `/api/v1/signing-packs/{packKey}`** for those.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "searchTerm",
            "in": "query",
            "description": "Text to match on pack name, company, form name or form code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "description": "Direct, Onboarding or Proposal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Sent, Opened, Part Signed, All Signed, Signed, Completed or Cancelled.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeCancelled",
            "in": "query",
            "description": "Include cancelled packs.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "includeCompleted",
            "in": "query",
            "description": "Include packs staff have marked Completed.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "1-based page (1–10000).",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.SignForm.DataObjects.SigningPackPublicDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.SignForm.DataObjects.SigningPackPublicDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.SignForm.DataObjects.SigningPackPublicDTO"
                  }
                }
              }
            }
          },
          "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/signing-packs/{packKey}": {
      "get": {
        "tags": [
          "Signing packs"
        ],
        "summary": "Get a signing pack",
        "description": "One signing pack: its forms, the people on it (Signer, Viewer, Copied in) and the client (`entityKey`),\r\nonboarding (`onboardingKey`) or proposal (`proposalKey`) it was sent for.\r\nThe `packKey` comes from the list or the `signing_pack.signed` webhook.\r\n\r\nForms with `hasSignedFile: true` can be downloaded once the pack is `Signed` or `Completed`.\r\n\r\n**404:** Pack not found for this practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "packKey",
            "in": "path",
            "description": "Signing pack key.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.SignForm.DataObjects.SigningPackPublicDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.SignForm.DataObjects.SigningPackPublicDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.SignForm.DataObjects.SigningPackPublicDTO"
                }
              }
            }
          },
          "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/signing-packs/{packKey}/download": {
      "get": {
        "tags": [
          "Signing packs"
        ],
        "summary": "Download a signed pack as a zip",
        "description": "A **zip** of each signed form and the pack's signing certificate, as separate PDFs\r\n(the same files as **Download** on the Signing page).\r\n\r\n**Response:** `application/zip` with a `Content-Disposition` attachment filename (`{pack name} - {company}.zip`).\r\n\r\n**404:** Pack not found, or no form in it is signed yet.\r\n\r\n**429:** Rate limit exceeded, or the server is busy building other downloads (retry shortly).",
        "parameters": [
          {
            "name": "packKey",
            "in": "path",
            "description": "Signing pack key.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "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/signing-packs/{packKey}/forms/{formKey}/signed": {
      "get": {
        "tags": [
          "Signing packs"
        ],
        "summary": "Download one signed form",
        "description": "The signed PDF of one form in the pack (`formKey` from the pack's `forms`).\r\n\r\n**Response:** `application/pdf`.\r\n\r\n**404:** Pack or form not found, or the form isn't signed yet.",
        "parameters": [
          {
            "name": "packKey",
            "in": "path",
            "description": "Signing pack key.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "formKey",
            "in": "path",
            "description": "Form key from the pack's forms.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/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/signing-packs/{packKey}/certificate": {
      "get": {
        "tags": [
          "Signing packs"
        ],
        "summary": "Download the signing certificate",
        "description": "The pack's signing certificate PDF (one per pack; for Annature and FuseSign packs, their certificate or audit trail).\r\n\r\n**Response:** `application/pdf`.\r\n\r\n**404:** Pack not found, or not signed yet.",
        "parameters": [
          {
            "name": "packKey",
            "in": "path",
            "description": "Signing pack key.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/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/statements/list": {
      "get": {
        "tags": [
          "Statements"
        ],
        "summary": "List statements for a client",
        "description": "Returns the 50 most recent statements that have been **sent** to the given client, newest period first.\r\n\r\nEach statement carries the period, opening / billed / paid / closing totals, and ageing of the closing balance\r\n(`ageingCurrent`, `ageingOverdue1To30`, `ageingOverdue31To60`, `ageingOverdue61To90`, `ageingOverdueOver90`).\r\n\r\n**400:** Missing or invalid `entityKey`.\r\n\r\n**404:** `entityKey` not found.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "entityKey",
            "in": "query",
            "description": "Client entity key (required).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.StatementApiListDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.StatementApiListDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.APIData.DataObjects.StatementApiListDTO"
                  }
                }
              }
            }
          },
          "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/statements/{statementId}": {
      "get": {
        "tags": [
          "Statements"
        ],
        "summary": "Load a statement",
        "description": "Returns a statement with its lines (invoices, payments and adjustments in the period, with running balance).\r\n\r\n`lineMode` is `activity` (all movement in the period) or `openitem` (outstanding invoices only).\r\n\r\n**404:** Unknown `statementId` or statement outside your practice.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "statementId",
            "in": "path",
            "description": "Statement id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.StatementApiDetailDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.StatementApiDetailDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.StatementApiDetailDTO"
                }
              }
            }
          },
          "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/statements/{statementId}/pdf": {
      "get": {
        "tags": [
          "Statements"
        ],
        "summary": "Download statement PDF",
        "description": "Returns the statement **PDF** (`application/pdf`). For sent statements this is the copy that was emailed to the client.\r\n\r\nIncludes the practice's pay-now link when statement pay links are enabled and a balance is owing.\r\n\r\n**404:** Unknown `statementId`, statement outside your practice, or PDF could not be produced.\r\n\r\n**429:** Rate limit exceeded.",
        "parameters": [
          {
            "name": "statementId",
            "in": "path",
            "description": "Statement id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "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/me": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get the signed-in user",
        "description": "Returns the staff user behind a signed-in (OAuth) connection: **`userKey`**, name, email, role and whether the connection can write. Use **`userKey`** wherever an endpoint filters by user (for example **GET `/api/v1/debtors/queue?assignee=`**).\r\n\r\n**400:** API keys act for the practice, not a person, so they have no \"me\".",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiMeDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiMeDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiMeDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/outstanding": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List outstanding work for a user",
        "description": "Work still in progress that the user created, last changed or approves, newest first: proposals not yet accepted, onboardings not yet completed, eForms sent or opened, ID verifications in progress and professional clearances awaiting a response. Same list as the dashboard's **Mine** view. Each item has **`appUrl`** to open it in OnboardMe.\r\n\r\nA signed-in (OAuth) caller gets their own; an API key must pass **`userKey`** (from **GET `/api/v1/users/list`**).",
        "parameters": [
          {
            "name": "userKey",
            "in": "query",
            "description": "User whose work to list. Required for API keys.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOutstandingListDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOutstandingListDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOutstandingListDTO"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/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) and the user's office\r\n(`officeId` / `officeName`, null when they have none). `updatedOn` also moves when the user's role,\r\noffice or disabled flag changes in your practice.\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\nSend **`officeId`** to move the user to an active office (from **GET `/api/v1/offices/list`**), or `0` to\r\nremove them from their office. For several users at once use **POST `/api/v1/users/office`**.\r\n\r\n`email` and `enable2FA` cannot be changed through the API (400 if they differ from the current values).\r\nName, mobile number and meeting link can only be changed for users who belong to your practice alone.\r\n\r\nYou cannot change users whose role ranks above yours (Owner > Admin > Finance Admin > User > Read Only),\r\nassign a role above your own, assign `Owner`, disable or demote an Owner, or change your own role or disable yourself.\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, or your role does not allow the change.\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` / `Finance Admin` / `Admin`).\r\nYou can only assign roles up to your own; the `Owner` role can only be assigned in the OnboardMe web app.\r\n\r\nOptionally put the user in an office with **`officeId`** (an active office from **GET `/api/v1/offices/list`**).\r\n\r\nA welcome / invite email is sent for new accounts (and when an existing account is newly linked to the practice).\r\nAn existing account keeps its own name, mobile number, 2FA and meeting link.\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, or your role cannot assign the requested role.\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/office": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Assign users to an office",
        "description": "Puts up to 100 users (by **`userKey`**) into one office, or removes them from their office when\r\n**`officeId`** is `null`. Office IDs come from **GET `/api/v1/offices/list`** and must be active.\r\n\r\nOnly **Owners and Admins** can assign offices. To change one user, you can also send **`officeId`** on\r\n**PUT `/api/v1/users/{userKey}`** (also Owners and Admins only).\r\n\r\nThe response lists keys that aren't members of your practice (`notFound`) and users you're not allowed\r\nto change because their role ranks above yours (`skipped`). `updatedCount` counts users whose office\r\nactually changed.\r\n\r\nFor practices connected to GreatSoft, users linked to a GreatSoft employee are set back to their\r\nGreatSoft office on the next sync.\r\n\r\nRequires an API client with **write** access.\r\n\r\n**403:** API client is read-only, or the signed-in user is not an Owner or Admin.\r\n\r\n**429:** Rate limit exceeded.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.UserOfficeAssignRequestDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.UserOfficeAssignRequestDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Application.APIData.DataObjects.UserOfficeAssignRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.UserOfficeAssignResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.UserOfficeAssignResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.APIData.DataObjects.UserOfficeAssignResponseDTO"
                }
              }
            }
          },
          "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/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\nOwners, users whose role ranks above yours, and your own account cannot be disabled through the API.\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, or your role does not allow disabling this user.\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`, `signing_pack.signed`). 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), `eform.submitted` (client submits an eForm)\r\nand `signing_pack.signed` (everyone has signed a signing pack and its signed documents are stored; fetch them with `GET /api/v1/signing-packs/{packKey}/download`).\r\nSee schemas **`ApiWebhookDeliveryEventDTO`**, **`ApiWebhookDeliveryEFormEventDTO`** and **`SigningPackSignedWebhookEventDTO`** 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\nResponse: `id`, `statusCode` (null when the connection failed), `success`, `elapsedMs`. Your endpoint's response body is not returned. Redirects are not followed.\r\nLive payload shape:**`ApiWebhookDeliveryEventDTO`**, **`ApiWebhookDeliveryEFormEventDTO`** or **`SigningPackSignedWebhookEventDTO`** 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.AmlBillingSummaryDTO": {
        "type": "object",
        "properties": {
          "requestsRequired": {
            "type": "integer",
            "format": "int32"
          },
          "fromSubscription": {
            "type": "integer",
            "format": "int32"
          },
          "purchasedFromWallet": {
            "type": "integer",
            "format": "int32"
          },
          "walletCharge": {
            "type": "number",
            "format": "double"
          },
          "subscriptionRemaining": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "waived": {
            "type": "boolean"
          },
          "flatFeeChecks": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.AmlCheckCreateRequestDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid"
          },
          "checkType": {
            "maxLength": 64,
            "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
          },
          "aml": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.AmlBillingSummaryDTO"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiBillSendRequestDTO": {
        "type": "object",
        "properties": {
          "emails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiBillSendResponseDTO": {
        "type": "object",
        "properties": {
          "billingId": {
            "type": "integer",
            "format": "int32"
          },
          "billNumber": {
            "type": "string",
            "nullable": true
          },
          "sentTo": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiDebtorCollectionRequestDTO": {
        "type": "object",
        "properties": {
          "collectionStatus": {
            "type": "string",
            "nullable": true
          },
          "promiseDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "assignedUserKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "unassign": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiDebtorNoteDTO": {
        "type": "object",
        "properties": {
          "noteId": {
            "type": "integer",
            "format": "int64"
          },
          "billingId": {
            "type": "integer",
            "format": "int32"
          },
          "noteText": {
            "type": "string",
            "nullable": true
          },
          "createdByName": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedByName": {
            "type": "string",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiDebtorNoteRequestDTO": {
        "type": "object",
        "properties": {
          "noteText": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiDebtorQueuePageDTO": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiDebtorQueueRowDTO"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiDebtorQueueRowDTO": {
        "type": "object",
        "properties": {
          "billingId": {
            "type": "integer",
            "format": "int32"
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "billNumber": {
            "type": "string",
            "nullable": true
          },
          "billDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "daysOverdue": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ageingBucket": {
            "type": "string",
            "nullable": true
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "outstandingTotal": {
            "type": "number",
            "format": "double"
          },
          "collectionStatus": {
            "type": "string",
            "nullable": true
          },
          "promiseDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "assignedUserKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "assignedUserName": {
            "type": "string",
            "nullable": true
          },
          "noteCount": {
            "type": "integer",
            "format": "int32"
          },
          "lastEmailSentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastSmsSentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "canEmail": {
            "type": "boolean"
          },
          "canSms": {
            "type": "boolean"
          },
          "workflowExcludedReason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiDebtorRemindRequestDTO": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "nullable": true
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "confirmRecent": {
            "type": "boolean"
          },
          "confirmPaused": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiDebtorReminderStatusDTO": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/Application.BillingDebtors.DataObjects.DebtorReminderStatusDTO"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.BillingDebtors.DataObjects.DebtorNotificationLogDTO"
            },
            "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.ApiMeDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "nullable": true
          },
          "canWrite": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiNotificationDTO": {
        "type": "object",
        "properties": {
          "notificationId": {
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "sender": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "proposalKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "onboardingKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "formKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "appUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiNotificationListDTO": {
        "type": "object",
        "properties": {
          "unreadCount": {
            "type": "integer",
            "format": "int32"
          },
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiNotificationDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiNotificationMarkAllRequestDTO": {
        "type": "object",
        "properties": {
          "upToNotificationId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiNotificationMarkAllResponseDTO": {
        "type": "object",
        "properties": {
          "marked": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiNotificationReadResponseDTO": {
        "type": "object",
        "properties": {
          "notificationId": {
            "type": "integer",
            "format": "int32"
          },
          "isRead": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiOfficeCreateRequestDTO": {
        "type": "object",
        "properties": {
          "officeName": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "officeCode": {
            "maxLength": 10,
            "type": "string",
            "nullable": true
          },
          "addressLine1": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "city": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "state": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "country": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "email": {
            "maxLength": 255,
            "type": "string",
            "format": "email",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiOfficeDTO": {
        "type": "object",
        "properties": {
          "officeId": {
            "type": "integer",
            "format": "int32"
          },
          "officeName": {
            "type": "string",
            "nullable": true
          },
          "officeCode": {
            "type": "string",
            "nullable": true
          },
          "addressLine1": {
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "inactive": {
            "type": "boolean"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiOfficeUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "officeName": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "officeCode": {
            "maxLength": 10,
            "type": "string",
            "nullable": true
          },
          "addressLine1": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "addressLine2": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "city": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "state": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "country": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "email": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "inactive": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiOutstandingItemDTO": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "client": {
            "type": "string",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "appUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiOutstandingListDTO": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int32"
          },
          "countsByType": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ApiOutstandingItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiPaymentLinkRequestDTO": {
        "type": "object",
        "properties": {
          "portalTab": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ApiPaymentLinkResponseDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "format": "uuid"
          },
          "portalUrl": {
            "type": "string",
            "nullable": true
          },
          "emailed": {
            "type": "boolean"
          }
        },
        "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": {
            "maximum": 99999999.99,
            "minimum": -99999999.99,
            "type": "number",
            "format": "double"
          },
          "taxAmount": {
            "maximum": 99999999.99,
            "minimum": -99999999.99,
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "taxPercent": {
            "maximum": 100,
            "minimum": 0,
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "total": {
            "maximum": 99999999.99,
            "minimum": -99999999.99,
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "narration": {
            "maxLength": 500,
            "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
          },
          "trackingOptionIDs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "greatSoftTaskCode": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "greatSoftAllocationCode": {
            "maxLength": 50,
            "type": "string",
            "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": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "refNo": {
            "maxLength": 50,
            "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": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "lineItems": {
            "maxItems": 200,
            "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"
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "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.BillLedgerAccountMappingDTO": {
        "type": "object",
        "properties": {
          "serviceID": {
            "type": "integer",
            "format": "int32"
          },
          "extAccountID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "extItemID": {
            "type": "integer",
            "format": "int32",
            "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.BillLedgerDefaultsDTO": {
        "type": "object",
        "properties": {
          "defaultRevenueAccountID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.BillLedgerGreatSoftCodeDTO": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "officeCode": {
            "type": "string",
            "nullable": true
          },
          "serviceLineCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.BillLedgerSaleItemDTO": {
        "type": "object",
        "properties": {
          "extItemID": {
            "type": "integer",
            "format": "int32"
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "accountCode": {
            "type": "string",
            "nullable": true
          },
          "taxType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.BillLedgerStatusDTO": {
        "type": "object",
        "properties": {
          "xeroConnected": {
            "type": "boolean"
          },
          "quickBooksConnected": {
            "type": "boolean"
          },
          "greatSoftConnected": {
            "type": "boolean"
          },
          "freeAgentConnected": {
            "type": "boolean"
          },
          "ledger": {
            "type": "string",
            "nullable": true
          }
        },
        "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.BillLedgerTrackingCategoryDTO": {
        "type": "object",
        "properties": {
          "categoryName": {
            "type": "string",
            "nullable": true
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.BillLedgerTrackingOptionDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.BillLedgerTrackingOptionDTO": {
        "type": "object",
        "properties": {
          "trackingOptionID": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "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": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "groupCode": {
            "maxLength": 10,
            "type": "string",
            "nullable": true
          },
          "status": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "source": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "value": {
            "maximum": 9999999999.99,
            "minimum": 0,
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "noteText": {
            "maxLength": 65535,
            "type": "string",
            "nullable": true
          },
          "noteType": {
            "maxLength": 45,
            "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": {
            "maxLength": 65535,
            "type": "string",
            "nullable": true
          },
          "noteType": {
            "maxLength": 45,
            "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": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "groupCode": {
            "maxLength": 10,
            "type": "string",
            "nullable": true
          },
          "status": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "source": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "value": {
            "maximum": 9999999999.99,
            "minimum": 0,
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DebtorAgeingApiDTO": {
        "type": "object",
        "properties": {
          "asOfDate": {
            "type": "string",
            "format": "date"
          },
          "totals": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.DebtorAgeingTotalsApiDTO"
          },
          "overdueArrangedTotal": {
            "type": "number",
            "format": "double"
          },
          "overdueUnarrangedTotal": {
            "type": "number",
            "format": "double"
          },
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.DebtorClientAgeingApiDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DebtorAgeingTotalsApiDTO": {
        "type": "object",
        "properties": {
          "current": {
            "type": "number",
            "format": "double"
          },
          "overdue1To30": {
            "type": "number",
            "format": "double"
          },
          "overdue31To60": {
            "type": "number",
            "format": "double"
          },
          "overdue61To90": {
            "type": "number",
            "format": "double"
          },
          "overdueOver90": {
            "type": "number",
            "format": "double"
          },
          "total": {
            "type": "number",
            "format": "double"
          },
          "invoiceCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DebtorClientAgeingApiDTO": {
        "type": "object",
        "properties": {
          "current": {
            "type": "number",
            "format": "double"
          },
          "overdue1To30": {
            "type": "number",
            "format": "double"
          },
          "overdue31To60": {
            "type": "number",
            "format": "double"
          },
          "overdue61To90": {
            "type": "number",
            "format": "double"
          },
          "overdueOver90": {
            "type": "number",
            "format": "double"
          },
          "total": {
            "type": "number",
            "format": "double"
          },
          "invoiceCount": {
            "type": "integer",
            "format": "int32"
          },
          "entityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "groupName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DebtorInvoiceApiDTO": {
        "type": "object",
        "properties": {
          "billingID": {
            "type": "integer",
            "format": "int32"
          },
          "billNumber": {
            "type": "string",
            "nullable": true
          },
          "billDate": {
            "type": "string",
            "format": "date"
          },
          "dueDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "billTotal": {
            "type": "number",
            "format": "double"
          },
          "paidTotal": {
            "type": "number",
            "format": "double"
          },
          "outstanding": {
            "type": "number",
            "format": "double"
          },
          "daysOverdue": {
            "type": "integer",
            "format": "int32"
          },
          "ageingBucket": {
            "type": "string",
            "nullable": true
          },
          "entityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "groupName": {
            "type": "string",
            "nullable": true
          },
          "collectionStatus": {
            "type": "string",
            "nullable": true
          },
          "promiseDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "onPaymentPlan": {
            "type": "boolean"
          },
          "hasScheduledPayment": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DebtorMovementApiDTO": {
        "type": "object",
        "properties": {
          "periodStart": {
            "type": "string",
            "format": "date"
          },
          "periodEnd": {
            "type": "string",
            "format": "date"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.DebtorMovementRowApiDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.DebtorMovementRowApiDTO": {
        "type": "object",
        "properties": {
          "level": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "groupName": {
            "type": "string",
            "nullable": true
          },
          "entityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "isOnboardingEntity": {
            "type": "boolean"
          },
          "opening": {
            "type": "number",
            "format": "double"
          },
          "billed": {
            "type": "number",
            "format": "double"
          },
          "payments": {
            "type": "number",
            "format": "double"
          },
          "cancelled": {
            "type": "number",
            "format": "double"
          },
          "other": {
            "type": "number",
            "format": "double"
          },
          "closing": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormActionResponseDTO": {
        "type": "object",
        "properties": {
          "formKey": {
            "type": "string",
            "format": "uuid"
          },
          "success": {
            "type": "boolean"
          },
          "statusName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormCreateRequestDTO": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "schema": {
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "recipientName": {
            "type": "string",
            "nullable": true
          },
          "recipientEmail": {
            "type": "string",
            "nullable": true
          },
          "recipientMobile": {
            "type": "string",
            "nullable": true
          },
          "sendSms": {
            "type": "boolean"
          },
          "emailSubject": {
            "type": "string",
            "nullable": true
          },
          "emailContent": {
            "type": "string",
            "nullable": true
          },
          "mute": {
            "type": "boolean"
          },
          "sendNow": {
            "type": "boolean"
          },
          "applyMergeFields": {
            "type": "boolean"
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormFormDefinitionDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormCreateResponseDTO": {
        "type": "object",
        "properties": {
          "formKey": {
            "type": "string",
            "format": "uuid"
          },
          "stackKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "accessUrl": {
            "type": "string",
            "nullable": true
          },
          "appUrl": {
            "type": "string",
            "nullable": true
          },
          "sent": {
            "type": "boolean"
          },
          "emailSent": {
            "type": "boolean"
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormCreatedFormDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormCreatedFormDTO": {
        "type": "object",
        "properties": {
          "formKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "stackPosition": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormDetailDTO": {
        "type": "object",
        "properties": {
          "formKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "statusID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "formTypeID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "recipientName": {
            "type": "string",
            "nullable": true
          },
          "recipientEmail": {
            "type": "string",
            "nullable": true
          },
          "recipientMobile": {
            "type": "string",
            "nullable": true
          },
          "sendSms": {
            "type": "boolean"
          },
          "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
          },
          "reminderCount": {
            "type": "integer",
            "format": "int32"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "accessUrl": {
            "type": "string",
            "nullable": true
          },
          "appUrl": {
            "type": "string",
            "nullable": true
          },
          "schema": { },
          "stackKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "stack": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormStackItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormFormDefinitionDTO": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "schema": {
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormIdentityOptionDTO": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormListItemDTO": {
        "type": "object",
        "properties": {
          "formKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "recipientName": {
            "type": "string",
            "nullable": true
          },
          "recipientEmail": {
            "type": "string",
            "nullable": true
          },
          "entityName": {
            "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
          },
          "reminderCount": {
            "type": "integer",
            "format": "int32"
          },
          "remindersPaused": {
            "type": "boolean"
          },
          "appUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormListResponseDTO": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormListItemDTO"
            },
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormQuestionTypeDTO": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "answerFormat": {
            "type": "string",
            "nullable": true
          },
          "conditionalOperators": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "canBeSensitive": {
            "type": "boolean"
          },
          "canUseMergeField": {
            "type": "boolean"
          },
          "allowedInRepeatingGroup": {
            "type": "boolean"
          },
          "allowedInRepeatingSection": {
            "type": "boolean"
          },
          "notes": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormSchemaGuideDTO": {
        "type": "object",
        "properties": {
          "questionTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormQuestionTypeDTO"
            },
            "nullable": true
          },
          "clientAccessValues": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "mergeFields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "identityVerificationMethods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.EFormIdentityOptionDTO"
            },
            "nullable": true
          },
          "exampleSchema": { }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormSendRequestDTO": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "integer",
            "format": "int32"
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "recipientName": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "recipientEmail": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "recipientMobile": {
            "maxLength": 45,
            "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
          },
          "appUrl": {
            "type": "string",
            "nullable": true
          },
          "emailSent": {
            "type": "boolean"
          },
          "sent": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormStackItemDTO": {
        "type": "object",
        "properties": {
          "formKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "stackPosition": {
            "type": "integer",
            "format": "int32"
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "sentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormTemplateDetailDTO": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "formTypeID": {
            "type": "integer",
            "format": "int32"
          },
          "formTypeName": {
            "type": "string",
            "nullable": true
          },
          "isStandard": {
            "type": "boolean"
          },
          "inactive": {
            "type": "boolean"
          },
          "emailSubject": {
            "type": "string",
            "nullable": true
          },
          "emailContent": {
            "type": "string",
            "nullable": true
          },
          "questionCount": {
            "type": "integer",
            "format": "int32"
          },
          "schema": { },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormTemplateSaveResponseDTO": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "integer",
            "format": "int32"
          },
          "savedAsPracticeCopy": {
            "type": "boolean"
          },
          "questionCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EFormTemplateUpsertRequestDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "formTypeID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "schema": { },
          "emailSubject": {
            "type": "string",
            "nullable": true
          },
          "emailContent": {
            "type": "string",
            "nullable": true
          },
          "inactive": {
            "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"
          },
          "groupID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clientKeys": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "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"
          },
          "appUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "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
          },
          "appUrl": {
            "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": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "address2": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "address3": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "address4": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "city": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "state": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "country": {
            "maxLength": 100,
            "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": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "contactSurname": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "salutation": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "addressee": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "email": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "position": {
            "maxLength": 100,
            "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": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "contactSurname": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "salutation": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "addressee": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "email": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "position": {
            "maxLength": 100,
            "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": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "clientStatus": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "entityCode": {
            "maxLength": 10,
            "type": "string",
            "nullable": true
          },
          "externalSystemID": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "entityName": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "otherName": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "entitySurname": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "entityInitials": {
            "maxLength": 10,
            "type": "string",
            "nullable": true
          },
          "birthDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "incorporationDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "birthPlace": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "birthTown": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "birthState": {
            "maxLength": 10,
            "type": "string",
            "nullable": true
          },
          "email": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "taxNumber": {
            "maxLength": 15,
            "type": "string",
            "nullable": true
          },
          "taxNotRequired": {
            "type": "boolean"
          },
          "salesTaxNumber": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "regNumber": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "idNumber": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "gender": {
            "maxLength": 10,
            "type": "string",
            "nullable": true
          },
          "note": {
            "maxLength": 65535,
            "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
          },
          "birthTown": {
            "type": "string",
            "nullable": true
          },
          "birthState": {
            "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.EntityExternalIdUpdateItemDTO": {
        "type": "object",
        "properties": {
          "entityKey": {
            "type": "string",
            "nullable": true
          },
          "externalSystemID": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EntityExternalIdUpdateResultDTO": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "entityKey": {
            "type": "string",
            "nullable": true
          },
          "externalSystemID": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EntityExternalIdsUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityExternalIdUpdateItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.EntityExternalIdsUpdateResponseDTO": {
        "type": "object",
        "properties": {
          "updated": {
            "type": "integer",
            "format": "int32"
          },
          "unchanged": {
            "type": "integer",
            "format": "int32"
          },
          "failed": {
            "type": "integer",
            "format": "int32"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityExternalIdUpdateResultDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "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": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "entityEmail": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "entityMobile": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "includeAml": {
            "maxLength": 64,
            "type": "string",
            "nullable": true
          },
          "mute": {
            "type": "boolean"
          },
          "templateBillId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.IdVerificationSendResponseDTO": {
        "type": "object",
        "properties": {
          "verificationKey": {
            "type": "string",
            "format": "uuid"
          },
          "wallet": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.IdVerificationSendWalletDTO"
          },
          "aml": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.AmlBillingSummaryDTO"
          },
          "accessUrl": {
            "type": "string",
            "nullable": true
          },
          "emailSent": {
            "type": "boolean"
          },
          "upfrontBill": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.IdVerificationUpfrontBillDTO"
          }
        },
        "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.IdVerificationTemplateBillDTO": {
        "type": "object",
        "properties": {
          "templateBillId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "invoiceCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.IdVerificationUpfrontBillDTO": {
        "type": "object",
        "properties": {
          "templateBillId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "amountDue": {
            "type": "number",
            "format": "double"
          },
          "invoiceCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "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": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "entityCode": {
            "maxLength": 10,
            "type": "string",
            "nullable": true
          },
          "externalSystemID": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "entityName": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "otherName": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "entitySurname": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "entityInitials": {
            "maxLength": 10,
            "type": "string",
            "nullable": true
          },
          "birthDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "incorporationDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "birthPlace": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "birthTown": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "birthState": {
            "maxLength": 10,
            "type": "string",
            "nullable": true
          },
          "email": {
            "maxLength": 100,
            "type": "string",
            "nullable": true
          },
          "telephone": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "taxNumber": {
            "maxLength": 15,
            "type": "string",
            "nullable": true
          },
          "taxNotRequired": {
            "type": "boolean"
          },
          "salesTaxNumber": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "regNumber": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "idNumber": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "gender": {
            "maxLength": 10,
            "type": "string",
            "nullable": true
          },
          "note": {
            "maxLength": 65535,
            "type": "string",
            "nullable": true
          },
          "physicalAddress": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityAddressCreateDTO"
          },
          "postalAddress": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.EntityAddressCreateDTO"
          },
          "leadSource": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "leadStatus": {
            "maxLength": 45,
            "type": "string",
            "nullable": true
          },
          "leadValue": {
            "maximum": 99999999.99,
            "minimum": 0,
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "ownerUserKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "expectedCloseDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "rating": {
            "maximum": 3,
            "minimum": 1,
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "referredBy": {
            "maxLength": 255,
            "type": "string",
            "nullable": true
          },
          "noteText": {
            "maxLength": 65535,
            "type": "string",
            "nullable": true
          },
          "noteType": {
            "maxLength": 45,
            "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
          },
          "leadStageType": {
            "type": "string",
            "nullable": true
          },
          "stageEnteredOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "closedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ownerUserKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "ownerName": {
            "type": "string",
            "nullable": true
          },
          "expectedCloseDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "rating": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "referredBy": {
            "type": "string",
            "nullable": true
          },
          "lostReason": {
            "type": "string",
            "nullable": true
          },
          "captureType": {
            "type": "string",
            "nullable": true
          },
          "captureName": {
            "type": "string",
            "nullable": true
          },
          "lastContactedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "nextStepOn": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "nextStepSubject": {
            "type": "string",
            "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
          },
          "leadStageType": {
            "type": "string",
            "nullable": true
          },
          "stageEnteredOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "closedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ownerUserKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "ownerName": {
            "type": "string",
            "nullable": true
          },
          "expectedCloseDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "rating": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "referredBy": {
            "type": "string",
            "nullable": true
          },
          "lostReason": {
            "type": "string",
            "nullable": true
          },
          "captureType": {
            "type": "string",
            "nullable": true
          },
          "captureName": {
            "type": "string",
            "nullable": true
          },
          "lastContactedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "nextStepOn": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "nextStepSubject": {
            "type": "string",
            "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": {
            "maxLength": 65535,
            "type": "string",
            "nullable": true
          },
          "noteType": {
            "maxLength": 45,
            "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.OnboardingActionRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "approverUserKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "paused": {
            "type": "boolean",
            "nullable": true
          },
          "engagementKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingBulkResendRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "onboardingKeys": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "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
          },
          "idOnly": {
            "type": "boolean"
          },
          "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.OnboardingClientDetailsUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingClientUpdateDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "remove": {
            "type": "boolean"
          },
          "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",
            "nullable": true
          },
          "identityVerification": {
            "type": "boolean",
            "nullable": true
          },
          "verificationMethod": {
            "type": "string",
            "nullable": true
          },
          "idOnly": {
            "type": "boolean",
            "nullable": true
          },
          "requireDocuments": {
            "type": "boolean",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "requestAccountingFileAccess": {
            "type": "boolean",
            "nullable": true
          },
          "accountingFileInviteName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingClientsUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientUpdateDTO"
            },
            "nullable": true
          },
          "recipientKeys": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingContactRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "surname": {
            "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",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingCreateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "sendToRecipient": {
            "type": "boolean"
          },
          "sendAllAtOnce": {
            "type": "boolean",
            "nullable": true
          },
          "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
          },
          "appUrl": {
            "type": "string",
            "nullable": true
          },
          "clients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingClientCreatedItemDTO"
            },
            "nullable": true
          },
          "aml": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.AmlBillingSummaryDTO"
          }
        },
        "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.OnboardingCustomFieldValueDTO": {
        "type": "object",
        "properties": {
          "customFieldID": {
            "type": "integer",
            "format": "int64"
          },
          "value": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingCustomFieldsRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingCustomFieldValueDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "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
          },
          "appUrl": {
            "type": "string",
            "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",
          "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": [ ],
              "formKey": "99999999-8888-7777-6666-555555555555",
              "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.OnboardingDetailsUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "emailSubject": {
            "type": "string",
            "nullable": true
          },
          "emailContent": {
            "type": "string",
            "nullable": true
          },
          "groupID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "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.OnboardingDocumentChangeDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "bypassed": {
            "type": "boolean",
            "nullable": true
          },
          "bypassReason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingDocumentRequirementDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "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"
          },
          "idOnly": {
            "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"
          },
          "formKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "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
          },
          "appUrl": {
            "type": "string",
            "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",
          "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.OnboardingNoteRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "text": {
            "type": "string",
            "nullable": true
          },
          "notifyClient": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingRecipientAccessItemDTO": {
        "type": "object",
        "properties": {
          "entityOnboardingId": {
            "type": "integer",
            "format": "int32"
          },
          "canEdit": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "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.OnboardingRecipientUpdateDTO": {
        "type": "object",
        "properties": {
          "recipientKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "remove": {
            "type": "boolean"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "surname": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "nullable": true
          },
          "sendSms": {
            "type": "boolean",
            "nullable": true
          },
          "access": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRecipientAccessItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingRecipientsUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "recipients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRecipientUpdateDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingRelationshipItemDTO": {
        "type": "object",
        "properties": {
          "fromClientID": {
            "type": "integer",
            "format": "int32"
          },
          "toClientID": {
            "type": "integer",
            "format": "int32"
          },
          "relationshipTypeID": {
            "type": "integer",
            "format": "int32"
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "percentage": {
            "type": "number",
            "format": "float",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.OnboardingRelationshipsRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "relationships": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.OnboardingRelationshipItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.PaymentApiDTO": {
        "type": "object",
        "properties": {
          "paymentID": {
            "type": "integer",
            "format": "int32"
          },
          "paymentNumber": {
            "type": "string",
            "nullable": true
          },
          "billingID": {
            "type": "integer",
            "format": "int32"
          },
          "billNumber": {
            "type": "string",
            "nullable": true
          },
          "externalInvoiceNumber": {
            "type": "string",
            "nullable": true
          },
          "entityID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "currencyID": {
            "type": "integer",
            "format": "int32"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "appliedAmount": {
            "type": "number",
            "format": "double"
          },
          "fee": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "paymentMethod": {
            "type": "string",
            "nullable": true
          },
          "paymentStatus": {
            "type": "string",
            "nullable": true
          },
          "paymentStatusName": {
            "type": "string",
            "nullable": true
          },
          "paymentReference": {
            "type": "string",
            "nullable": true
          },
          "paymentDate": {
            "type": "string",
            "format": "date-time"
          },
          "processedDate": {
            "type": "string",
            "format": "date-time"
          },
          "isRefunded": {
            "type": "boolean"
          },
          "refundReference": {
            "type": "string",
            "nullable": true
          },
          "refundReason": {
            "type": "string",
            "nullable": true
          },
          "externalID": {
            "type": "string",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "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"
          },
          "stageType": {
            "type": "string",
            "nullable": true
          }
        },
        "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.ProposalActionRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "packageChosen": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalActionResponseDTO": {
        "type": "object",
        "properties": {
          "engagementKey": {
            "type": "string",
            "format": "uuid"
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "billOnCompletionPush": {
            "nullable": true
          },
          "appUrl": {
            "type": "string",
            "nullable": true
          },
          "aml": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.AmlBillingSummaryDTO"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalApproverListItemDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalApproversResponseDTO": {
        "type": "object",
        "properties": {
          "approvalEnforced": {
            "type": "boolean"
          },
          "selfApprover": {
            "type": "boolean"
          },
          "approvers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalApproverListItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalBillingUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "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
          },
          "billFromServices": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateBillFromServicesDTO"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalChecklistQuestionDTO": {
        "type": "object",
        "properties": {
          "order": {
            "type": "integer",
            "format": "int32"
          },
          "text": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalChecklistTemplateDetailDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "isRiskChecklist": {
            "type": "boolean"
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalChecklistQuestionDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalChecklistTemplateListItemDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "isRiskChecklist": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalChecklistUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "checklist": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateChecklistDTO"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalClientEFormRequestDTO": {
        "type": "object",
        "properties": {
          "clientKey": {
            "type": "string",
            "format": "uuid"
          },
          "formTemplateID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "signatoryEmail": {
            "type": "string",
            "nullable": true
          }
        },
        "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"
          },
          "appUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "sourceEngagementKey": "8f9e2b1c-3d4a-5e6f-7890-abcdef012345",
          "engagementKey": "9a0b1c2d-4e5f-6071-890a-bcdef0123456",
          "sentToClient": false,
          "sourceMarkedRenewed": false
        }
      },
      "Application.APIData.DataObjects.ProposalCreateBillFromServicesDTO": {
        "type": "object",
        "properties": {
          "billNow": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "billDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "sendBill": {
            "type": "boolean",
            "nullable": true
          },
          "recurringSchedules": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateChecklistDTO": {
        "type": "object",
        "properties": {
          "templateID": {
            "type": "integer",
            "format": "int32"
          },
          "signOffRequired": {
            "type": "boolean"
          },
          "signOffUserKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateDocumentDTO": {
        "type": "object",
        "properties": {
          "documentID": {
            "type": "integer",
            "format": "int64"
          },
          "detailsOverride": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateEthicalLetterDTO": {
        "type": "object",
        "properties": {
          "templateID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "sendWhen": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "accountantName": {
            "type": "string",
            "nullable": true
          },
          "accountantEmail": {
            "type": "string",
            "nullable": true
          },
          "partnerUserKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "requireDocuments": {
            "type": "boolean"
          },
          "documentRequirements": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateFreeAgentProjectDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "remove": {
            "type": "boolean"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "budget": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "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",
            "nullable": true
          },
          "includeUnbilledTimeInProfitability": {
            "type": "boolean",
            "nullable": true
          },
          "startsOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endsOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateFyiJobDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "remove": {
            "type": "boolean"
          },
          "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.ProposalCreateGreatSoftTaskDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "remove": {
            "type": "boolean"
          },
          "stdTaskID": {
            "type": "integer",
            "format": "int32"
          },
          "officeCode": {
            "type": "string",
            "nullable": true
          },
          "managerCode": {
            "type": "string",
            "nullable": true
          },
          "partnerCode": {
            "type": "string",
            "nullable": true
          },
          "billingManagerGuid": {
            "type": "string",
            "nullable": true
          },
          "currencyCode": {
            "type": "string",
            "nullable": true
          },
          "dateOpen": {
            "type": "string",
            "format": "date-time",
            "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": {
          "id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "remove": {
            "type": "boolean"
          },
          "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.ProposalCreateKarbonWorkItemDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "remove": {
            "type": "boolean"
          },
          "workTemplateKey": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "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
          },
          "primaryStatus": {
            "type": "string",
            "nullable": true
          },
          "secondaryStatus": {
            "type": "string",
            "nullable": true
          },
          "assigneeEmail": {
            "type": "string",
            "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
          },
          "groupID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "formTemplateID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sendAllAtOnce": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreatePackageDTO": {
        "type": "object",
        "properties": {
          "packageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "price": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "text": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateRecurringBillingDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "remove": {
            "type": "boolean"
          },
          "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"
          },
          "groupID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clientKeys": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "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"
          },
          "businessSignatoryUserKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "requiresApproval": {
            "type": "boolean",
            "nullable": true
          },
          "approverUserKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "termsDetailsOverride": {
            "type": "string",
            "nullable": true
          },
          "stpID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "stpDetailsOverride": {
            "type": "string",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateDocumentDTO"
            },
            "nullable": true
          },
          "attachmentID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "coverPageID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "welcomeMessageID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "videoUrl": {
            "type": "string",
            "nullable": true
          },
          "emailSubject": {
            "type": "string",
            "nullable": true
          },
          "emailContent": {
            "type": "string",
            "nullable": true
          },
          "packages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreatePackageDTO"
            },
            "nullable": true
          },
          "popularPackage": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "showServiceMenu": {
            "type": "boolean",
            "nullable": true
          },
          "serviceGrouping": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "signatories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateSignatoryDTO"
            },
            "nullable": true
          },
          "includeCdd": {
            "type": "boolean",
            "nullable": true
          },
          "payerID": {
            "type": "string",
            "nullable": true
          },
          "billFromServices": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateBillFromServicesDTO"
          },
          "eForms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalClientEFormRequestDTO"
            },
            "nullable": true
          },
          "ethicalLetter": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateEthicalLetterDTO"
          },
          "checklist": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateChecklistDTO"
          },
          "karbonWorkItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateKarbonWorkItemDTO"
            },
            "nullable": true
          },
          "greatSoftTasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateGreatSoftTaskDTO"
            },
            "nullable": true
          },
          "freeAgentProjects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateFreeAgentProjectDTO"
            },
            "nullable": true
          }
        },
        "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
                }
              ]
            }
          ],
          "requestPaymentDetails": true,
          "paymentDetailsType": 1,
          "terms": 42,
          "stpID": 7,
          "documents": [
            {
              "documentID": 15
            }
          ],
          "attachmentID": 3,
          "businessSignatoryUserKey": "11111111-2222-3333-4444-555555555555",
          "requiresApproval": true,
          "approverUserKey": "66666666-7777-8888-9999-000000000000",
          "packages": [
            {
              "packageNumber": 1,
              "name": "Compliance"
            }
          ],
          "emailSubject": "Your FY26 engagement",
          "emailContent": "<p>Please review and accept: [Link]</p>",
          "ethicalLetter": {
            "templateID": 4,
            "sendWhen": 89,
            "accountantName": "Previous Accountant",
            "accountantEmail": "accounts@previous.example"
          },
          "checklist": {
            "templateID": 21,
            "signOffRequired": false
          }
        }
      },
      "Application.APIData.DataObjects.ProposalCreateServiceDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "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",
            "nullable": true
          },
          "discountPerc": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "discountAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "serviceDetail": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateSignatoryDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "remove": {
            "type": "boolean"
          },
          "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.ProposalCreateXpmJobDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "remove": {
            "type": "boolean"
          },
          "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
          },
          "staffUuids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateXpmJobTaskDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalCreateXpmJobTaskDTO": {
        "type": "object",
        "properties": {
          "taskID": {
            "type": "integer",
            "format": "int32"
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "estimatedMinutes": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalDetailsUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "welcomeMessageID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "videoUrl": {
            "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
          },
          "expiryDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "terms": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "termsDetailsOverride": {
            "type": "string",
            "nullable": true
          },
          "stpID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "stpDetailsOverride": {
            "type": "string",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateDocumentDTO"
            },
            "nullable": true
          },
          "attachmentID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "coverPageID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "emailSubject": {
            "type": "string",
            "nullable": true
          },
          "emailContent": {
            "type": "string",
            "nullable": true
          },
          "packages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreatePackageDTO"
            },
            "nullable": true
          },
          "popularPackage": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "showServiceMenu": {
            "type": "boolean",
            "nullable": true
          },
          "serviceGrouping": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sendSms": {
            "type": "boolean",
            "nullable": true
          },
          "requestPaymentDetails": {
            "type": "boolean",
            "nullable": true
          },
          "paymentDetailsType": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "payerID": {
            "type": "string",
            "nullable": true
          },
          "businessSignatoryUserKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "requiresApproval": {
            "type": "boolean",
            "nullable": true
          },
          "approverUserKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "includeCdd": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalDuplicateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "sendToClient": {
            "type": "boolean"
          },
          "pricingMode": {
            "type": "string",
            "nullable": true
          },
          "increasePercent": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "userKey": "11111111-2222-3333-4444-555555555555",
          "sendToClient": false
        }
      },
      "Application.APIData.DataObjects.ProposalEFormUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "eForms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalClientEFormRequestDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalFreeAgentProjectsUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "freeAgentProjects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateFreeAgentProjectDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": 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.ProposalFyiJobsUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "fyiJobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateFyiJobDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalGreatSoftCurrencyListItemDTO": {
        "type": "object",
        "properties": {
          "currencyCode": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "currencyID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalGreatSoftOfficeListItemDTO": {
        "type": "object",
        "properties": {
          "officeCode": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalGreatSoftStaffListItemDTO": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "guid": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalGreatSoftStdTaskListItemDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "taskCode": {
            "type": "string",
            "nullable": true
          },
          "taskDescription": {
            "type": "string",
            "nullable": true
          },
          "serviceLineCode": {
            "type": "string",
            "nullable": true
          },
          "serviceLineDescription": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalGreatSoftTasksUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "greatSoftTasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateGreatSoftTaskDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalKarbonUserListItemDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalKarbonWorkItemsUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "karbonWorkItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateKarbonWorkItemDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalKarbonWorkStatusListItemDTO": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "primaryStatus": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalKarbonWorkTemplateListItemDTO": {
        "type": "object",
        "properties": {
          "workTemplateKey": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "workTypeKey": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalLookupValueDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalOptionItemDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "isStandard": {
            "type": "boolean"
          },
          "inactive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "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": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "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
          },
          "pricingMode": {
            "type": "string",
            "nullable": true
          },
          "increasePercent": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "example": {
          "userKey": "11111111-2222-3333-4444-555555555555",
          "sendToClient": false,
          "signatorySource": "Proposal"
        }
      },
      "Application.APIData.DataObjects.ProposalServiceLineEditDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "serviceID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "packageNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "remove": {
            "type": "boolean"
          },
          "quantity": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "price": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "taxAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "discountPerc": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "discountAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "isOptional": {
            "type": "boolean",
            "nullable": true
          },
          "moveToPackageNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "serviceDetail": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalServicesPatchRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalServiceLineEditDTO"
            },
            "nullable": true
          },
          "addServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateServiceDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalServicesReplaceRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateServiceDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalSignatoriesUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "signatories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateSignatoryDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalTermsListItemDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "isStandard": {
            "type": "boolean"
          },
          "isPracticeDefault": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalUpdateResponseDTO": {
        "type": "object",
        "properties": {
          "engagementKey": {
            "type": "string",
            "format": "uuid"
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "billingNeedsReview": {
            "type": "boolean"
          },
          "pricing": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalPricingSnapshotDTO"
          },
          "section": {
            "nullable": true
          },
          "appUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ProposalWelcomeMessageListItemDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "messageText": {
            "type": "string",
            "nullable": true
          },
          "isPracticeDefault": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "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.ProposalXpmJobsUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "xpmJobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ProposalCreateXpmJobDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "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.ProposalXpmTaskListItemDTO": {
        "type": "object",
        "properties": {
          "taskID": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "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.ServiceImportOptionsDTO": {
        "type": "object",
        "properties": {
          "serviceTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "pricingModels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ServiceImportPricingModelDTO"
            },
            "nullable": true
          },
          "frequencies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "taxRates": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            },
            "nullable": true
          },
          "maxRows": {
            "type": "integer",
            "format": "int32"
          },
          "nameMaxLength": {
            "type": "integer",
            "format": "int32"
          },
          "priceMax": {
            "type": "number",
            "format": "double"
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ServiceImportPricingModelDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ServiceImportRequestDTO": {
        "type": "object",
        "properties": {
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ServiceImportRowDTO"
            },
            "nullable": true
          },
          "dryRun": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ServiceImportResponseDTO": {
        "type": "object",
        "properties": {
          "dryRun": {
            "type": "boolean"
          },
          "createdCount": {
            "type": "integer",
            "format": "int32"
          },
          "updatedCount": {
            "type": "integer",
            "format": "int32"
          },
          "failedCount": {
            "type": "integer",
            "format": "int32"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.ServiceImportRowResultDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ServiceImportRowDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "serviceType": {
            "type": "string",
            "nullable": true
          },
          "pricingModel": {
            "type": "string",
            "nullable": true
          },
          "frequency": {
            "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
          },
          "taxPercent": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "includeInMenu": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.ServiceImportRowResultDTO": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "operation": {
            "type": "string",
            "nullable": true
          },
          "serviceId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "success": {
            "type": "boolean"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.StatementApiDetailDTO": {
        "type": "object",
        "properties": {
          "statementID": {
            "type": "integer",
            "format": "int32"
          },
          "statementRunID": {
            "type": "integer",
            "format": "int32"
          },
          "entityID": {
            "type": "integer",
            "format": "int32"
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "periodStart": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "periodEnd": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "lineMode": {
            "type": "string",
            "nullable": true
          },
          "openingTotal": {
            "type": "number",
            "format": "double"
          },
          "periodBillTotal": {
            "type": "number",
            "format": "double"
          },
          "periodPaymentTotal": {
            "type": "number",
            "format": "double"
          },
          "closingTotal": {
            "type": "number",
            "format": "double"
          },
          "ageingCurrent": {
            "type": "number",
            "format": "double"
          },
          "ageingOverdue1To30": {
            "type": "number",
            "format": "double"
          },
          "ageingOverdue31To60": {
            "type": "number",
            "format": "double"
          },
          "ageingOverdue61To90": {
            "type": "number",
            "format": "double"
          },
          "ageingOverdueOver90": {
            "type": "number",
            "format": "double"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "sentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.StatementApiLineDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.StatementApiLineDTO": {
        "type": "object",
        "properties": {
          "lineDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "lineType": {
            "type": "string",
            "nullable": true
          },
          "billingID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "paymentID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "debit": {
            "type": "number",
            "format": "double"
          },
          "credit": {
            "type": "number",
            "format": "double"
          },
          "runningBalance": {
            "type": "number",
            "format": "double"
          },
          "outstandingAtEnd": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.StatementApiListDTO": {
        "type": "object",
        "properties": {
          "statementID": {
            "type": "integer",
            "format": "int32"
          },
          "statementRunID": {
            "type": "integer",
            "format": "int32"
          },
          "entityID": {
            "type": "integer",
            "format": "int32"
          },
          "entityKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "periodStart": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "periodEnd": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "lineMode": {
            "type": "string",
            "nullable": true
          },
          "openingTotal": {
            "type": "number",
            "format": "double"
          },
          "periodBillTotal": {
            "type": "number",
            "format": "double"
          },
          "periodPaymentTotal": {
            "type": "number",
            "format": "double"
          },
          "closingTotal": {
            "type": "number",
            "format": "double"
          },
          "ageingCurrent": {
            "type": "number",
            "format": "double"
          },
          "ageingOverdue1To30": {
            "type": "number",
            "format": "double"
          },
          "ageingOverdue31To60": {
            "type": "number",
            "format": "double"
          },
          "ageingOverdue61To90": {
            "type": "number",
            "format": "double"
          },
          "ageingOverdueOver90": {
            "type": "number",
            "format": "double"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "sentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.TermsFormatGuideDTO": {
        "type": "object",
        "properties": {
          "contentFormat": {
            "type": "string",
            "nullable": true
          },
          "maxContentBytes": {
            "type": "integer",
            "format": "int32"
          },
          "maxNameLength": {
            "type": "integer",
            "format": "int32"
          },
          "allowedHtml": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "layoutTokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsFormatTokenDTO"
            },
            "nullable": true
          },
          "signatureTokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsFormatTokenDTO"
            },
            "nullable": true
          },
          "inputFields": {
            "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsFormatInputFieldsDTO"
          },
          "mergeFieldGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsMergeFieldGroupDTO"
            },
            "nullable": true
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "convertingWordDocuments": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "exampleContent": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.TermsFormatInputFieldsDTO": {
        "type": "object",
        "properties": {
          "syntax": {
            "type": "string",
            "nullable": true
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "maxLabelLength": {
            "type": "integer",
            "format": "int32"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.TermsFormatTokenDTO": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.TermsMergeFieldGroupDTO": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.TermsFormatTokenDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.TermsTemplateDetailDTO": {
        "type": "object",
        "properties": {
          "termsId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "isStandard": {
            "type": "boolean"
          },
          "isPracticeDefault": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          },
          "content": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.TermsTemplateSaveResponseDTO": {
        "type": "object",
        "properties": {
          "termsId": {
            "type": "integer",
            "format": "int32"
          },
          "savedAsPracticeCopy": {
            "type": "boolean"
          },
          "unknownMergeFields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.TermsTemplateUpsertRequestDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.UserCreateRequestDTO": {
        "type": "object",
        "properties": {
          "firstName": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "email": {
            "maxLength": 100,
            "type": "string",
            "format": "email",
            "nullable": true
          },
          "mobileNumber": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "roleName": {
            "maxLength": 30,
            "type": "string",
            "nullable": true
          },
          "roleId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "enable2FA": {
            "type": "boolean"
          },
          "meetingLink": {
            "maxLength": 500,
            "type": "string",
            "nullable": true
          },
          "officeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.UserCreateResponseDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "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"
          },
          "officeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "officeName": {
            "type": "string",
            "nullable": true
          },
          "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.UserOfficeAssignRequestDTO": {
        "type": "object",
        "properties": {
          "userKeys": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "officeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.UserOfficeAssignResponseDTO": {
        "type": "object",
        "properties": {
          "officeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "updatedCount": {
            "type": "integer",
            "format": "int32"
          },
          "notFound": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.APIData.DataObjects.UserOfficeSkippedDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.UserOfficeSkippedDTO": {
        "type": "object",
        "properties": {
          "userKey": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.APIData.DataObjects.UserUpdateRequestDTO": {
        "type": "object",
        "properties": {
          "firstName": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "maxLength": 50,
            "type": "string",
            "nullable": true
          },
          "email": {
            "maxLength": 100,
            "type": "string",
            "format": "email",
            "nullable": true
          },
          "mobileNumber": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "roleName": {
            "maxLength": 30,
            "type": "string",
            "nullable": true
          },
          "roleId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "enable2FA": {
            "type": "boolean",
            "nullable": true
          },
          "meetingLink": {
            "maxLength": 500,
            "type": "string",
            "nullable": true
          },
          "inactive": {
            "type": "boolean",
            "nullable": true
          },
          "officeId": {
            "type": "integer",
            "format": "int32",
            "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
          },
          "preferredMethodDiscountApplied": {
            "type": "boolean"
          },
          "preferredMethodDiscountPercent": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "preferredMethodDiscountMethod": {
            "type": "string",
            "nullable": true
          },
          "preDiscountBillTotal": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "preferredMethodDiscountAmount": {
            "type": "number",
            "format": "double",
            "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
          },
          "timesheetEntryKeys": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "billingDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.BillingDetails.DataObjects.BillingDetailsDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.BillingDebtors.DataObjects.DebtorChannelStatusDTO": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean"
          },
          "blockedReason": {
            "type": "string",
            "nullable": true
          },
          "hasRecipient": {
            "type": "boolean"
          },
          "lastSentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "recentlySent": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.BillingDebtors.DataObjects.DebtorNotificationLogDTO": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "recipient": {
            "type": "string",
            "nullable": true
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "sentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deliveredOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "openedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "failedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "failureReason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.BillingDebtors.DataObjects.DebtorReminderStatusDTO": {
        "type": "object",
        "properties": {
          "email": {
            "$ref": "#/components/schemas/Application.BillingDebtors.DataObjects.DebtorChannelStatusDTO"
          },
          "sms": {
            "$ref": "#/components/schemas/Application.BillingDebtors.DataObjects.DebtorSmsChannelStatusDTO"
          },
          "pauseReason": {
            "type": "string",
            "nullable": true
          },
          "workflowExcludedReason": {
            "type": "string",
            "nullable": true
          },
          "promiseDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "promiseBreaksAfter": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.BillingDebtors.DataObjects.DebtorSendReminderResult": {
        "type": "object",
        "properties": {
          "httpStatus": {
            "type": "integer",
            "format": "int32"
          },
          "outcome": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "idempotent": {
            "type": "boolean"
          },
          "lastSentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "pauseReason": {
            "type": "string",
            "nullable": true
          },
          "promiseDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.BillingDebtors.DataObjects.DebtorSmsChannelStatusDTO": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean"
          },
          "blockedReason": {
            "type": "string",
            "nullable": true
          },
          "hasRecipient": {
            "type": "boolean"
          },
          "lastSentOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "recentlySent": {
            "type": "boolean"
          },
          "segments": {
            "type": "integer",
            "format": "int32"
          },
          "estimatedCost": {
            "type": "number",
            "format": "double"
          }
        },
        "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
          },
          "engagementDetailID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isDiscountNote": {
            "type": "boolean"
          }
        },
        "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.ClientTables.ProposalClientSignerDTO": {
        "type": "object",
        "properties": {
          "clientRowKey": {
            "type": "string",
            "nullable": true
          },
          "signatureKey": {
            "type": "string",
            "nullable": true
          },
          "position": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.Engagements.DataObjects.EngagementClientDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "engagementID": {
            "type": "integer",
            "format": "int32"
          },
          "signForms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.SignForm.DataObjects.SignFormEntityFormDTO"
            },
            "nullable": true
          },
          "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
          },
          "videoUrl": {
            "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"
          },
          "hasSignForms": {
            "type": "boolean",
            "nullable": true
          },
          "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"
          },
          "clientForms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.Engagements.DataObjects.ProposalClientFormDTO"
            },
            "nullable": true
          },
          "clientSigners": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.Engagements.ClientTables.ProposalClientSignerDTO"
            },
            "nullable": true
          },
          "onboardingGroupID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "onboardingSendAllAtOnce": {
            "type": "boolean",
            "nullable": true
          },
          "onboardingAttachmentID": {
            "type": "integer",
            "format": "int64",
            "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"
          },
          "hasSubscription": {
            "type": "boolean"
          },
          "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
          },
          "appUrl": {
            "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"
          },
          "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.DataObjects.ProposalClientFormDTO": {
        "type": "object",
        "properties": {
          "entityID": {
            "type": "integer",
            "format": "int32"
          },
          "formKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "form": {
            "$ref": "#/components/schemas/Application.Forms.DataObjects.FormDTO"
          },
          "signatureKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "stackSlots": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "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
          },
          "idOnly": {
            "type": "boolean"
          },
          "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"
          },
          "formKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "form": {
            "$ref": "#/components/schemas/Application.Forms.DataObjects.FormDTO"
          },
          "formRecipientIDs": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "nullable": true
          },
          "formSignatureKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "formStackSlots": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "accInviteName": {
            "type": "string",
            "nullable": true
          },
          "canDelete": {
            "type": "boolean"
          },
          "tempKey": {
            "type": "string",
            "nullable": true
          },
          "clientRowKey": {
            "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"
          },
          "signFormRequestKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "sortOrder": {
            "type": "integer",
            "format": "int32"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "signFormStatus": {
            "type": "string",
            "nullable": true
          },
          "signFormCompanyName": {
            "type": "string",
            "nullable": true
          },
          "oneOff": {
            "type": "boolean"
          },
          "fromPack": {
            "type": "boolean"
          }
        },
        "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
          },
          "coverPageID": {
            "type": "integer",
            "format": "int32",
            "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"
          },
          "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
          },
          "idBilledOn": {
            "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
          },
          "jobKey": {
            "type": "string",
            "nullable": true
          },
          "parentJobKey": {
            "type": "string",
            "nullable": true
          },
          "parentFYJobID": {
            "type": "string",
            "nullable": true
          },
          "budgetAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "budgetHours": {
            "type": "number",
            "format": "double",
            "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"
          },
          "recurFrequency": {
            "type": "string",
            "nullable": true
          },
          "recurUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "parentJobID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "deployOnAcceptance": {
            "type": "boolean"
          },
          "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
          },
          "codeExpiresOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "openedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "submittedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "idOnly": {
            "type": "boolean"
          },
          "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
          },
          "engagementDetailID": {
            "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
          },
          "jobSystem": {
            "type": "string",
            "nullable": true
          },
          "jobID": {
            "type": "string",
            "nullable": true
          },
          "jobCostCode": {
            "type": "string",
            "nullable": true
          },
          "jobUnitCost": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "jobRateID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "jobBillable": {
            "type": "boolean"
          },
          "jobCostOnly": {
            "type": "boolean"
          },
          "subscriptionJobCostRateID": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.Role.DataObjects.RoleDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "roleName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.SignForm.DataObjects.SignFormEntityFormDTO": {
        "type": "object",
        "properties": {
          "requestKey": {
            "type": "string",
            "format": "uuid"
          },
          "packKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "packName": {
            "type": "string",
            "nullable": true
          },
          "formName": {
            "type": "string",
            "nullable": true
          },
          "formCode": {
            "type": "string",
            "nullable": true
          },
          "firmDocument": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "signingOutsidePortal": {
            "type": "boolean"
          },
          "signers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.SignForm.DataObjects.SignFormEntitySignerDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.SignForm.DataObjects.SignFormEntitySignerDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "surname": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "signedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "canSign": {
            "type": "boolean"
          },
          "signerKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "roleLabel": {
            "type": "string",
            "nullable": true
          },
          "packSignerNumber": {
            "type": "integer",
            "format": "int32"
          },
          "waitingFor": {
            "type": "string",
            "nullable": true
          },
          "previewSignerID": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.SignForm.DataObjects.SigningPackPublicDTO": {
        "type": "object",
        "properties": {
          "packKey": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "signedWith": {
            "type": "string",
            "nullable": true
          },
          "entityKey": {
            "type": "string",
            "nullable": true
          },
          "onboardingKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "proposalKey": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time"
          },
          "signedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "markedCompletedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "signingPageUrl": {
            "type": "string",
            "nullable": true
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.SignForm.DataObjects.SigningPackPublicFormDTO"
            },
            "nullable": true
          },
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application.SignForm.DataObjects.SigningPackPublicPersonDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.SignForm.DataObjects.SigningPackPublicFormDTO": {
        "type": "object",
        "properties": {
          "formKey": {
            "type": "string",
            "format": "uuid"
          },
          "formCode": {
            "type": "string",
            "nullable": true
          },
          "formName": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "signedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "hasSignedFile": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Application.SignForm.DataObjects.SigningPackPublicPersonDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "nullable": true
          },
          "isTeamMember": {
            "type": "boolean"
          },
          "signedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Application.Webhooks.DataObjects.SigningPackSignedWebhookEventDTO": { },
      "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": [ ]
    }
  ]
}