{
  "openapi": "3.0.4",
  "info": {
    "title": "StrategyOverview External API",
    "description": "External API for StrategyOverview data. Exposed as MCP tools via API Management.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.us.strategyoverview.com",
      "description": "Public gateway base URL."
    }
  ],
  "paths": {
    "/v1/ai/query_assessment": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Assessment questions by name, one call: one item for one client (\"status of Backup for Northwind\"), one\nitem across clients (\"clients with Backup ungraded\"), one client's items by grade (\"Contoso's Danger\nitems\"), or client health (\"clients under 50\"). Reads each client's latest report\n(report=latestDraft/latestCompleted to change; template limits it to that template's reports). Graded =\nmoved off the template default. Counts by default; detail=rows pages rows. Names only, never ids; several\nmatches return candidates and no data. Item names match the client's own report first, exact before\npartial; an item in several groups returns the groups; group picks one.\nWhen to use: whether a practice is in place, filled out, graded or at risk.\nNot here: device inventory (ages, warranties) — query_technology; Microsoft 365 users and\nMFA — query_m365_users; a client briefing — brief; changing a grade — grade_assessment_item.",
        "description": "Assessment questions by name, one call: one item for one client (\"status of Backup for Northwind\"), one\nitem across clients (\"clients with Backup ungraded\"), one client's items by grade (\"Contoso's Danger\nitems\"), or client health (\"clients under 50\"). Reads each client's latest report\n(report=latestDraft/latestCompleted to change; template limits it to that template's reports). Graded =\nmoved off the template default. Counts by default; detail=rows pages rows. Names only, never ids; several\nmatches return candidates and no data. Item names match the client's own report first, exact before\npartial; an item in several groups returns the groups; group picks one.\nWhen to use: whether a practice is in place, filled out, graded or at risk.\nNot here: device inventory (ages, warranties) — query_technology; Microsoft 365 users and\nMFA — query_m365_users; a client briefing — brief; changing a grade — grade_assessment_item.",
        "operationId": "query_assessment",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryAssessmentInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryAssessmentResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/brief": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "One-call briefing for a client or, without one, a portfolio triage. Client: latest report, health score,\ngraded/ungraded counts, items graded below healthy with budgets, open initiatives, goals by status with\nthose at risk or overdue, proposals by base status with the ones not closed due next, this year's schedules,\nMicrosoft 365 posture, technology counts by category and next quarter's plan totals. Portfolio: lowest\nhealth, most ungraded, clients without a report, vCIOs with overdue schedules, weakest MFA and most\ntechnology awaiting a grade. A section you cannot read, or an empty one, is omitted with a note. Names only;\nseveral matches return candidates and no data.\nWhen to use: 'catch me up on Contoso', 'who needs attention this week'.\nNot here: the detail behind a section — query_assessment, query_schedule, query_m365_users,\nquery_technology, query_initiatives, query_goals, query_proposals or query_plans; changing a grade —\ngrade_assessment_item.",
        "description": "One-call briefing for a client or, without one, a portfolio triage. Client: latest report, health score,\ngraded/ungraded counts, items graded below healthy with budgets, open initiatives, goals by status with\nthose at risk or overdue, proposals by base status with the ones not closed due next, this year's schedules,\nMicrosoft 365 posture, technology counts by category and next quarter's plan totals. Portfolio: lowest\nhealth, most ungraded, clients without a report, vCIOs with overdue schedules, weakest MFA and most\ntechnology awaiting a grade. A section you cannot read, or an empty one, is omitted with a note. Names only;\nseveral matches return candidates and no data.\nWhen to use: 'catch me up on Contoso', 'who needs attention this week'.\nNot here: the detail behind a section — query_assessment, query_schedule, query_m365_users,\nquery_technology, query_initiatives, query_goals, query_proposals or query_plans; changing a grade —\ngrade_assessment_item.",
        "operationId": "brief",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BriefInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BriefResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/grade_assessment_item": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Updates one assessment item on a client's current draft by name: client + item, then grade and/or\nstatus, risk, solution, budgets (at least one; the rest stay as they are). Names match exactly (case aside): a\npartial match, even one, or several matches return candidates and change nothing - call again with a\ncandidate's exact name. An item on the draft in several groups needs group; several open drafts of different\ntemplates need template. Returns the item as query_assessment shows it.\nWhen to use: 'grade Contoso's backup as Healthy', 'set Contoso's MDR status to Sentinel One'. A product or\nvendor name is not an item name: query_assessment lists the client's items.\nNot here: completed reports (create_assessment_draft first); several items of one client (update_assessment_items);\none item on several clients (update_assessment_item_for_clients). An unknown grade returns the nearest of the\ntemplate's grades. For a client overview, use brief.",
        "description": "Updates one assessment item on a client's current draft by name: client + item, then grade and/or\nstatus, risk, solution, budgets (at least one; the rest stay as they are). Names match exactly (case aside): a\npartial match, even one, or several matches return candidates and change nothing - call again with a\ncandidate's exact name. An item on the draft in several groups needs group; several open drafts of different\ntemplates need template. Returns the item as query_assessment shows it.\nWhen to use: 'grade Contoso's backup as Healthy', 'set Contoso's MDR status to Sentinel One'. A product or\nvendor name is not an item name: query_assessment lists the client's items.\nNot here: completed reports (create_assessment_draft first); several items of one client (update_assessment_items);\none item on several clients (update_assessment_item_for_clients). An unknown grade returns the nearest of the\ntemplate's grades. For a client overview, use brief.",
        "operationId": "grade_assessment_item",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GradeAssessmentItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GradeAssessmentItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/update_assessment_items": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Updates several assessment items of one client's current draft: client, then items, up to 200\nrows, each an item name with its own values - grade and/or status, risk, solution, budgets (at least one; the\nrest stay as they are; an empty text clears it). Names match exactly (case aside). Rows are independent: each\ncomes back written (with its grade and status after the write), skipped (with the reason) or ambiguous (with\ncandidates), and a row that fails writes nothing of itself. An item on the draft in several groups needs group;\ntwo rows on one item are both skipped. Open drafts of several templates need template.\nWhen to use: filling in a client's assessment, 'set Contoso's backup, firewall and MDR'. A product or vendor\nname is not an item name: query_assessment lists the client's items.\nNot here: one item (grade_assessment_item); one item on several clients (update_assessment_item_for_clients);\ncompleted reports (create_assessment_draft).",
        "description": "Updates several assessment items of one client's current draft: client, then items, up to 200\nrows, each an item name with its own values - grade and/or status, risk, solution, budgets (at least one; the\nrest stay as they are; an empty text clears it). Names match exactly (case aside). Rows are independent: each\ncomes back written (with its grade and status after the write), skipped (with the reason) or ambiguous (with\ncandidates), and a row that fails writes nothing of itself. An item on the draft in several groups needs group;\ntwo rows on one item are both skipped. Open drafts of several templates need template.\nWhen to use: filling in a client's assessment, 'set Contoso's backup, firewall and MDR'. A product or vendor\nname is not an item name: query_assessment lists the client's items.\nNot here: one item (grade_assessment_item); one item on several clients (update_assessment_item_for_clients);\ncompleted reports (create_assessment_draft).",
        "operationId": "update_assessment_items",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAssessmentItemsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateAssessmentItemsResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/update_assessment_item_for_clients": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Sets one assessment item's values on several clients' current drafts: item, then grade and/or status, risk,\nsolution, budgets (at least one; others unchanged), and clients (up to 100 exact names) or allClients with\ntemplate. preview defaults to true and returns what would be written without writing; preview false writes.\nallClients writes go 100 clients per call: repeat with the returned nextOffset until none is returned; a later\nwrite whose total differs from the first write's means clients changed: redo from offset 0. Each client comes\nback written, skipped (reason) or ambiguous (candidates); skipped and ambiguous clients are not written.\nWhen to use: 'set the MDR status to Sentinel One for all clients'. A product or vendor name is not an item\nname: query_assessment lists the items.\nNot here: one client - grade_assessment_item (one item) or update_assessment_items (several items);\ncompleted reports (create_assessment_draft first).",
        "description": "Sets one assessment item's values on several clients' current drafts: item, then grade and/or status, risk,\nsolution, budgets (at least one; others unchanged), and clients (up to 100 exact names) or allClients with\ntemplate. preview defaults to true and returns what would be written without writing; preview false writes.\nallClients writes go 100 clients per call: repeat with the returned nextOffset until none is returned; a later\nwrite whose total differs from the first write's means clients changed: redo from offset 0. Each client comes\nback written, skipped (reason) or ambiguous (candidates); skipped and ambiguous clients are not written.\nWhen to use: 'set the MDR status to Sentinel One for all clients'. A product or vendor name is not an item\nname: query_assessment lists the items.\nNot here: one client - grade_assessment_item (one item) or update_assessment_items (several items);\ncompleted reports (create_assessment_draft first).",
        "operationId": "update_assessment_item_for_clients",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAssessmentItemForClientsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateAssessmentItemForClientsResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/create_assessment_draft": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Creates a draft assessment report for one client from a report template, both by exact name (case aside): a\npartial match, even one, or several matches return candidates and create nothing. The new draft copies the\nclient's latest report of that template forward unless carryForward is false. When the client already has an\nopen draft of that template it is refused and nothing is created: the answer says so (created false) and gives\nthat draft's reference when the caller can see it. Creating archives completed reports of the template beyond\nthe four newest, as the application does. One client per call. Returns the new draft's reference and the date\nof the report it was copied from.\nWhen to use: 'start a new assessment for Contoso', creating a draft for every client without one.\nNot here: filling the new draft - update_assessment_items; reading it - query_assessment.",
        "description": "Creates a draft assessment report for one client from a report template, both by exact name (case aside): a\npartial match, even one, or several matches return candidates and create nothing. The new draft copies the\nclient's latest report of that template forward unless carryForward is false. When the client already has an\nopen draft of that template it is refused and nothing is created: the answer says so (created false) and gives\nthat draft's reference when the caller can see it. Creating archives completed reports of the template beyond\nthe four newest, as the application does. One client per call. Returns the new draft's reference and the date\nof the report it was copied from.\nWhen to use: 'start a new assessment for Contoso', creating a draft for every client without one.\nNot here: filling the new draft - update_assessment_items; reading it - query_assessment.",
        "operationId": "create_assessment_draft",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAssessmentDraftInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAssessmentDraftResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/update_initiative_item": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Updates one initiative item of a client by name: client + item (its current name), then only the fields\ngiven - newName, status, priority, month, year, itemsBudget, laborBudget, partsBudget (oneTimeBudget is their\nsum), recurringBudget, assignee (an empty string clears it), tags (replaces the whole set), summary, nextSteps.\nEvery name is resolved by exact name (case aside): a partial match, even one, or several matches return\ncandidates and change nothing - call again with a candidate's exact name; an unknown name returns the nearest\nnames. The write keeps the Initiatives module's roles, access, internal-field and length rules.\nReturns the item as query_initiatives shows it.\nWhen to use: 'move Contoso's firewall refresh to Q3 2027', 'mark it Completed'.\nNot here: the HTML content, the order, moving an item to another client; links - link_initiative_item; plan\nitems - query_plans reads them; to read items before changing one, use query_initiatives.",
        "description": "Updates one initiative item of a client by name: client + item (its current name), then only the fields\ngiven - newName, status, priority, month, year, itemsBudget, laborBudget, partsBudget (oneTimeBudget is their\nsum), recurringBudget, assignee (an empty string clears it), tags (replaces the whole set), summary, nextSteps.\nEvery name is resolved by exact name (case aside): a partial match, even one, or several matches return\ncandidates and change nothing - call again with a candidate's exact name; an unknown name returns the nearest\nnames. The write keeps the Initiatives module's roles, access, internal-field and length rules.\nReturns the item as query_initiatives shows it.\nWhen to use: 'move Contoso's firewall refresh to Q3 2027', 'mark it Completed'.\nNot here: the HTML content, the order, moving an item to another client; links - link_initiative_item; plan\nitems - query_plans reads them; to read items before changing one, use query_initiatives.",
        "operationId": "update_initiative_item",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInitiativeItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateInitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/update_plan_item": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Updates one item of a client's standalone plan, found by client + item name (plan narrows when the client has\nseveral plans, part when the name is in several parts) or by client + itemId (a row id from query_plans). Then\nonly the fields given - newName, status (a status label of the item's part), month, year, oneTimeBudget, assignee\n(the User column; an empty string clears it), description, parentId (moves it under that row). Names must\nbe exact (case aside): a partial match, even one, or several matches return candidates and change nothing; an\nunknown name returns the nearest names. The write keeps the Plans module's per-plan access, editable-column and\nlength rules. Returns the item as query_plans shows it.\nWhen to use: 'push Contoso's server upgrade to March 2027'.\nNot here: the recurring total (computed), a report's plan, initiative items - update_initiative_item; a new item -\ncreate_plan_item; to read plan items first, use query_plans.",
        "description": "Updates one item of a client's standalone plan, found by client + item name (plan narrows when the client has\nseveral plans, part when the name is in several parts) or by client + itemId (a row id from query_plans). Then\nonly the fields given - newName, status (a status label of the item's part), month, year, oneTimeBudget, assignee\n(the User column; an empty string clears it), description, parentId (moves it under that row). Names must\nbe exact (case aside): a partial match, even one, or several matches return candidates and change nothing; an\nunknown name returns the nearest names. The write keeps the Plans module's per-plan access, editable-column and\nlength rules. Returns the item as query_plans shows it.\nWhen to use: 'push Contoso's server upgrade to March 2027'.\nNot here: the recurring total (computed), a report's plan, initiative items - update_initiative_item; a new item -\ncreate_plan_item; to read plan items first, use query_plans.",
        "operationId": "update_plan_item",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePlanItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePlanItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/create_plan_item": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Creates one item in a client's standalone plan: client + name, then optionally status (a status label of the\npart), month, year, oneTimeBudget, assignee (the User column), description. parentId (a row id from query_plans)\nputs it under that row, in that row's plan and part; without it, plan and part pick them when the client has\nseveral plans or the plan several parts. The item lands last. Exact names only (case aside): a partial match, even\none, or several return candidates and create nothing; an unknown name returns the nearest names. The write keeps\nthe Plans module's per-plan access, editable-column and length rules; a retry creates a second item. Returns the\nnew row as query_plans shows it, with its id.\nWhen to use: 'add Replace firewall under Contoso's 2027 > Q4'.\nNot here: an item from an assessment finding - create_initiative_from_finding; initiative items are not created\nhere; changing an item - update_plan_item; the parent row's id - query_plans.",
        "description": "Creates one item in a client's standalone plan: client + name, then optionally status (a status label of the\npart), month, year, oneTimeBudget, assignee (the User column), description. parentId (a row id from query_plans)\nputs it under that row, in that row's plan and part; without it, plan and part pick them when the client has\nseveral plans or the plan several parts. The item lands last. Exact names only (case aside): a partial match, even\none, or several return candidates and create nothing; an unknown name returns the nearest names. The write keeps\nthe Plans module's per-plan access, editable-column and length rules; a retry creates a second item. Returns the\nnew row as query_plans shows it, with its id.\nWhen to use: 'add Replace firewall under Contoso's 2027 > Q4'.\nNot here: an item from an assessment finding - create_initiative_from_finding; initiative items are not created\nhere; changing an item - update_plan_item; the parent row's id - query_plans.",
        "operationId": "create_plan_item",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePlanItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePlanItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/create_initiative_from_finding": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Turns an assessment finding into planned work: client + item (read like query_assessment; template, group,\nreport narrow it) creates an initiative item with the finding's name, solution as summary, month/year, budgets\n(one-time budget into budgetLine: items, labor or parts) - or, with target plan, plan or part, a plan item with\nthe solution as description. Exact names only (case aside): a partial match, even one, or several return\ncandidates and create nothing; a value the target cannot take is left out with a note. The write keeps the\nmodule's roles, access and validation. The finding is linked to the new item when its report is a draft; a retry\ncreates a second item. Returns the new row as query_initiatives or query_plans shows it.\nWhen to use: 'add Contoso's Backup finding to initiatives', 'put it on the Roadmap plan'.\nNot here: changing the finding - grade_assessment_item; editing the row - update_initiative_item,\nupdate_plan_item; more links - link_initiative_item.",
        "description": "Turns an assessment finding into planned work: client + item (read like query_assessment; template, group,\nreport narrow it) creates an initiative item with the finding's name, solution as summary, month/year, budgets\n(one-time budget into budgetLine: items, labor or parts) - or, with target plan, plan or part, a plan item with\nthe solution as description. Exact names only (case aside): a partial match, even one, or several return\ncandidates and create nothing; a value the target cannot take is left out with a note. The write keeps the\nmodule's roles, access and validation. The finding is linked to the new item when its report is a draft; a retry\ncreates a second item. Returns the new row as query_initiatives or query_plans shows it.\nWhen to use: 'add Contoso's Backup finding to initiatives', 'put it on the Roadmap plan'.\nNot here: changing the finding - grade_assessment_item; editing the row - update_initiative_item,\nupdate_plan_item; more links - link_initiative_item.",
        "operationId": "create_initiative_from_finding",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInitiativeFromFindingInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateInitiativeFromFindingResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/update_goal": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Updates one goal of a client by name: client + goal (its current name), then only the fields given - newName,\nstatus (Planned, On track, At risk or Done; an empty string clears it), progress (0-100), isTrackProgress,\nstartDate, targetDate (yyyy-MM-dd), owner (full name; an empty string clears it), description (an empty string\nclears it). Every name is resolved by exact name (case aside): a partial match, even one, or several matches\nreturn candidates and change nothing - call again with a candidate's exact name; an unknown name returns the\nnearest names. Values are stored as given: Done does not set progress. The write keeps patchGoal's roles, access,\nowner and length rules. Returns the goal as query_goals shows it.\nWhen to use: 'mark Contoso's backup goal at risk', 'move its target to June 30'.\nNot here: a new goal - create_goal; linking initiatives or plans - link_goal; to read goals first, use\nquery_goals.",
        "description": "Updates one goal of a client by name: client + goal (its current name), then only the fields given - newName,\nstatus (Planned, On track, At risk or Done; an empty string clears it), progress (0-100), isTrackProgress,\nstartDate, targetDate (yyyy-MM-dd), owner (full name; an empty string clears it), description (an empty string\nclears it). Every name is resolved by exact name (case aside): a partial match, even one, or several matches\nreturn candidates and change nothing - call again with a candidate's exact name; an unknown name returns the\nnearest names. Values are stored as given: Done does not set progress. The write keeps patchGoal's roles, access,\nowner and length rules. Returns the goal as query_goals shows it.\nWhen to use: 'mark Contoso's backup goal at risk', 'move its target to June 30'.\nNot here: a new goal - create_goal; linking initiatives or plans - link_goal; to read goals first, use\nquery_goals.",
        "operationId": "update_goal",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGoalInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateGoalResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/create_goal": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Creates one goal for a client by name: client + name, optionally template (a goal template name from your\nlibrary: its description, icon and colour are copied unless given), description, status (Planned, On track, At\nrisk or Done), progress, isTrackProgress, startDate, targetDate (yyyy-MM-dd) and owner (full name). Exact names\nonly (case aside): a partial match, even one, or several matches return candidates and create nothing; an unknown\nname returns the nearest names. A name the client already has on a goal is refused, so a retry after the goal\nwas created creates nothing.\nThe create keeps createGoal's roles, company access, owner and length rules; a template also needs Goals_Templates\nRead. Returns the goal as query_goals shows it.\nWhen to use: 'add a goal for Contoso: pass the cyber insurance audit by March 31'.\nNot here: changing a goal - update_goal; to read goals first, use query_goals.",
        "description": "Creates one goal for a client by name: client + name, optionally template (a goal template name from your\nlibrary: its description, icon and colour are copied unless given), description, status (Planned, On track, At\nrisk or Done), progress, isTrackProgress, startDate, targetDate (yyyy-MM-dd) and owner (full name). Exact names\nonly (case aside): a partial match, even one, or several matches return candidates and create nothing; an unknown\nname returns the nearest names. A name the client already has on a goal is refused, so a retry after the goal\nwas created creates nothing.\nThe create keeps createGoal's roles, company access, owner and length rules; a template also needs Goals_Templates\nRead. Returns the goal as query_goals shows it.\nWhen to use: 'add a goal for Contoso: pass the cyber insurance audit by March 31'.\nNot here: changing a goal - update_goal; to read goals first, use query_goals.",
        "operationId": "create_goal",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGoalInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGoalResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/link_goal": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Links a client's goal by name to initiatives, plans and plan rows: client + goal, then initiatives (item names),\nplans (plan names), planItems (plan + item pairs, the row inside that plan's first part). Exact names only (case\naside): a partial or repeated match returns candidates and links nothing; an unknown name returns the nearest\nnames. An existing link is kept without error; a plan row already covered by a linked plan is refused per name;\nlinking a whole plan drops the goal's direct links to its rows. Returns the goal as query_goals shows it with\nwritten and refused rows.\nWhen to use: 'link Contoso's Backup initiative to the Cyber-resilience goal'.\nNot here: removing a link - unlink_goal; from the initiative side - link_initiative_item; reading - query_goals.",
        "description": "Links a client's goal by name to initiatives, plans and plan rows: client + goal, then initiatives (item names),\nplans (plan names), planItems (plan + item pairs, the row inside that plan's first part). Exact names only (case\naside): a partial or repeated match returns candidates and links nothing; an unknown name returns the nearest\nnames. An existing link is kept without error; a plan row already covered by a linked plan is refused per name;\nlinking a whole plan drops the goal's direct links to its rows. Returns the goal as query_goals shows it with\nwritten and refused rows.\nWhen to use: 'link Contoso's Backup initiative to the Cyber-resilience goal'.\nNot here: removing a link - unlink_goal; from the initiative side - link_initiative_item; reading - query_goals.",
        "operationId": "link_goal",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkGoalInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkGoalResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/unlink_goal": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Unlinks a client's goal by name from initiatives, plans and plan rows: client + goal, then initiatives (item\nnames), plans (plan names), planItems (plan + item pairs, the row inside that plan's first part). Names resolve\namong the goal's links only. Exact names only (case aside): a partial or repeated match returns candidates and\nunlinks nothing; a name that is not linked returns the nearest linked names and unlinks nothing. Only the link\ngoes, never the record; a plan row covered by its linked plan goes with that plan, not as a row. Returns the goal\nas query_goals shows it with written and refused rows.\nWhen to use: 'unlink the Backup initiative from Contoso's Cyber-resilience goal'.\nNot here: adding a link - link_goal; from the initiative side - unlink_initiative_item; reading - query_goals.",
        "description": "Unlinks a client's goal by name from initiatives, plans and plan rows: client + goal, then initiatives (item\nnames), plans (plan names), planItems (plan + item pairs, the row inside that plan's first part). Names resolve\namong the goal's links only. Exact names only (case aside): a partial or repeated match returns candidates and\nunlinks nothing; a name that is not linked returns the nearest linked names and unlinks nothing. Only the link\ngoes, never the record; a plan row covered by its linked plan goes with that plan, not as a row. Returns the goal\nas query_goals shows it with written and refused rows.\nWhen to use: 'unlink the Backup initiative from Contoso's Cyber-resilience goal'.\nNot here: adding a link - link_goal; from the initiative side - unlink_initiative_item; reading - query_goals.",
        "operationId": "unlink_goal",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnlinkGoalInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkGoalResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/link_initiative_item": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Links one initiative item of a client by name to goals, technology items and assessment findings: client + item,\nthen goals (goal names), technologyItems (item names; technologyGroup narrows them), findings (assessment item names\non the client's latest draft report by default; template, group and report narrow them — only a draft report's\nfindings can be linked). Exact names only (case aside): a partial or repeated match returns candidates and links\nnothing; an unknown name returns the nearest names. An existing link is kept without error; a technology item linked\nto another initiative is refused per name (unlink it there first). Returns the item as query_initiatives shows it\nwith written and refused rows.\nWhen to use: 'link Contoso's Replace firewall initiative to goal Zero trust and technology item FW-01'.\nNot here: removing - unlink_initiative_item; from the goal or project side - link_goal, link_project; a new item\nfrom a finding - create_initiative_from_finding.",
        "description": "Links one initiative item of a client by name to goals, technology items and assessment findings: client + item,\nthen goals (goal names), technologyItems (item names; technologyGroup narrows them), findings (assessment item names\non the client's latest draft report by default; template, group and report narrow them — only a draft report's\nfindings can be linked). Exact names only (case aside): a partial or repeated match returns candidates and links\nnothing; an unknown name returns the nearest names. An existing link is kept without error; a technology item linked\nto another initiative is refused per name (unlink it there first). Returns the item as query_initiatives shows it\nwith written and refused rows.\nWhen to use: 'link Contoso's Replace firewall initiative to goal Zero trust and technology item FW-01'.\nNot here: removing - unlink_initiative_item; from the goal or project side - link_goal, link_project; a new item\nfrom a finding - create_initiative_from_finding.",
        "operationId": "link_initiative_item",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkInitiativeItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkInitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/unlink_initiative_item": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Unlinks one initiative item of a client by name from goals, technology items and assessment findings: client +\nitem, then goals (goal names), technologyItems (item names; technologyGroup narrows them), findings (assessment item\nnames; template and group narrow them). Names resolve among the item's links only. Exact names only (case aside): a\npartial or repeated match returns candidates and unlinks nothing; a name that is not linked returns the nearest\nlinked names and unlinks nothing. Only the link goes, never the record. Returns the item as query_initiatives shows\nit with written and refused rows.\nWhen to use: 'unlink Contoso's Replace firewall initiative from goal Zero trust'.\nNot here: adding a link - link_initiative_item; from the goal or project side - unlink_goal, unlink_project.",
        "description": "Unlinks one initiative item of a client by name from goals, technology items and assessment findings: client +\nitem, then goals (goal names), technologyItems (item names; technologyGroup narrows them), findings (assessment item\nnames; template and group narrow them). Names resolve among the item's links only. Exact names only (case aside): a\npartial or repeated match returns candidates and unlinks nothing; a name that is not linked returns the nearest\nlinked names and unlinks nothing. Only the link goes, never the record. Returns the item as query_initiatives shows\nit with written and refused rows.\nWhen to use: 'unlink Contoso's Replace firewall initiative from goal Zero trust'.\nNot here: adding a link - link_initiative_item; from the goal or project side - unlink_goal, unlink_project.",
        "operationId": "unlink_initiative_item",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnlinkInitiativeItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkInitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/update_project": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Sets the Internal flag of one project of a client by name: client + project (its name as the PSA sends it) +\nisInternal (true or false), stored as sent. A project is hidden from client users and from client views of reports\nwhile isInternal is true or its status, type or board is internal (inheritedInternalSources), so false leaves such\na project hidden (note says so).\nNames resolve by exact name (case aside): a partial match, even one, or several matches return candidates and change\nnothing - call again with a candidate's exact name; an unknown name returns the nearest names; projects sharing one\nexact name cannot be told apart here. The write keeps the Projects module's access rules. Returns the project as\nquery_projects shows it.\nWhen to use: 'mark Contoso's Office move project internal'.\nNot here: the PSA's own fields (status, dates, hours: change them in the PSA); links - link_project; to read projects\nfirst, use query_projects.",
        "description": "Sets the Internal flag of one project of a client by name: client + project (its name as the PSA sends it) +\nisInternal (true or false), stored as sent. A project is hidden from client users and from client views of reports\nwhile isInternal is true or its status, type or board is internal (inheritedInternalSources), so false leaves such\na project hidden (note says so).\nNames resolve by exact name (case aside): a partial match, even one, or several matches return candidates and change\nnothing - call again with a candidate's exact name; an unknown name returns the nearest names; projects sharing one\nexact name cannot be told apart here. The write keeps the Projects module's access rules. Returns the project as\nquery_projects shows it.\nWhen to use: 'mark Contoso's Office move project internal'.\nNot here: the PSA's own fields (status, dates, hours: change them in the PSA); links - link_project; to read projects\nfirst, use query_projects.",
        "operationId": "update_project",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateProjectResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/link_project": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Links one project of a client by name to initiatives and plan rows: client + project, then initiatives (initiative\nitem names of that client), planItems (plan + item pairs, the row inside that plan's first part). Only a project\nstill synced from the PSA can gain links. Exact names only (case aside): a partial or repeated match returns\ncandidates and links nothing; an unknown name returns the nearest names. An existing link is kept without error.\nReturns the project as query_projects shows it with written and refused rows.\nWhen to use: 'link Contoso's Firewall upgrade project to the Replace firewall initiative'.\nNot here: removing a link - unlink_project; the Internal flag - update_project; reading - query_projects.",
        "description": "Links one project of a client by name to initiatives and plan rows: client + project, then initiatives (initiative\nitem names of that client), planItems (plan + item pairs, the row inside that plan's first part). Only a project\nstill synced from the PSA can gain links. Exact names only (case aside): a partial or repeated match returns\ncandidates and links nothing; an unknown name returns the nearest names. An existing link is kept without error.\nReturns the project as query_projects shows it with written and refused rows.\nWhen to use: 'link Contoso's Firewall upgrade project to the Replace firewall initiative'.\nNot here: removing a link - unlink_project; the Internal flag - update_project; reading - query_projects.",
        "operationId": "link_project",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkProjectInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkProjectResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/unlink_project": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Unlinks one project of a client by name from initiatives and plan rows: client + project, then initiatives\n(initiative item names), planItems (plan + item pairs, a row of that plan linked to the project, in any part).\nNames resolve among the project's links only. Exact names only (case aside): a partial or repeated match returns\ncandidates and unlinks nothing; a name that is not linked returns the nearest linked names and unlinks nothing.\nOnly the link goes, never the record; a project no longer synced from the PSA can still lose its links. Returns\nthe project as query_projects shows it with written and refused rows.\nWhen to use: 'unlink the Replace firewall initiative from Contoso's Firewall upgrade project'.\nNot here: adding a link - link_project; reading - query_projects.",
        "description": "Unlinks one project of a client by name from initiatives and plan rows: client + project, then initiatives\n(initiative item names), planItems (plan + item pairs, a row of that plan linked to the project, in any part).\nNames resolve among the project's links only. Exact names only (case aside): a partial or repeated match returns\ncandidates and unlinks nothing; a name that is not linked returns the nearest linked names and unlinks nothing.\nOnly the link goes, never the record; a project no longer synced from the PSA can still lose its links. Returns\nthe project as query_projects shows it with written and refused rows.\nWhen to use: 'unlink the Replace firewall initiative from Contoso's Firewall upgrade project'.\nNot here: adding a link - link_project; reading - query_projects.",
        "operationId": "unlink_project",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnlinkProjectInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkProjectResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/query_m365_users": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Microsoft 365 user posture for one client or across clients from the synced directory data: users,\nadmins, admins without MFA, users without MFA, guests, unlicensed accounts, accounts with no sign-in for\nN days, with the sync date per client. Filters: mfa, isAdmin, licensed, licenseContains, noSignInDays,\npasswordNeverExpires, userType. detail=rows lists the users (name, principal, licenses, MFA, last\nsign-in), paged. MFA means registered, not enforced; unknown values are counted separately when a tenant\nlacks the Entra licence for sign-in and registration data. When to use: 'which clients have admins\nwithout MFA', 'unused licenses at Contoso'. Not here: assessment items about MFA policy — use\nquery_assessment; a client's whole picture — use brief.",
        "description": "Microsoft 365 user posture for one client or across clients from the synced directory data: users,\nadmins, admins without MFA, users without MFA, guests, unlicensed accounts, accounts with no sign-in for\nN days, with the sync date per client. Filters: mfa, isAdmin, licensed, licenseContains, noSignInDays,\npasswordNeverExpires, userType. detail=rows lists the users (name, principal, licenses, MFA, last\nsign-in), paged. MFA means registered, not enforced; unknown values are counted separately when a tenant\nlacks the Entra licence for sign-in and registration data. When to use: 'which clients have admins\nwithout MFA', 'unused licenses at Contoso'. Not here: assessment items about MFA policy — use\nquery_assessment; a client's whole picture — use brief.",
        "operationId": "query_m365_users",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryM365UsersInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryM365UsersResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/query_schedule": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Which clients are overdue, due this month, on track or done for their scheduled reports this year, for one\nclient, one template or one vCIO (primary user), with per-vCIO totals. Uses the schedule's reports-per-year\nand target months (default cadence when none are set) against completed reports; drafts do not count as\ndelivered. detail=rows lists each client with target, completed and draft months and the next due month.\nWhen to use: 'who is overdue', 'what is due for Jesse this month'. Not here: report contents — use\nquery_assessment; a client's whole picture — use brief; changing the vCIO — the primary user is set\nin the app, not by this connector.",
        "description": "Which clients are overdue, due this month, on track or done for their scheduled reports this year, for one\nclient, one template or one vCIO (primary user), with per-vCIO totals. Uses the schedule's reports-per-year\nand target months (default cadence when none are set) against completed reports; drafts do not count as\ndelivered. detail=rows lists each client with target, completed and draft months and the next due month.\nWhen to use: 'who is overdue', 'what is due for Jesse this month'. Not here: report contents — use\nquery_assessment; a client's whole picture — use brief; changing the vCIO — the primary user is set\nin the app, not by this connector.",
        "operationId": "query_schedule",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryScheduleInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryScheduleResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/query_initiatives": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Initiative items for one client or all clients: counts by status, by quarter and by client, budget totals, and\nthe items themselves on request. Filters: status label, open (not completed), tag, assignee, year and calendar\nquarter, minimum one-time budget. When to use: 'what is planned for Contoso next quarter', 'how many open\ninitiatives per client'. Not here: plan (roadmap) items — use query_plans; assessment findings — use\nquery_assessment; PSA projects — use query_projects; a client's whole picture — use brief.",
        "description": "Initiative items for one client or all clients: counts by status, by quarter and by client, budget totals, and\nthe items themselves on request. Filters: status label, open (not completed), tag, assignee, year and calendar\nquarter, minimum one-time budget. When to use: 'what is planned for Contoso next quarter', 'how many open\ninitiatives per client'. Not here: plan (roadmap) items — use query_plans; assessment findings — use\nquery_assessment; PSA projects — use query_projects; a client's whole picture — use brief.",
        "operationId": "query_initiatives",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryInitiativesInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryInitiativesResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/query_plans": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Plan items for one client's plan or across clients: counts by status, by quarter and by client, one-time and\nrecurring budget totals, and the items on request. Rows carry the item id, part, parent id, path, position and\nassignee; itemId with detail=rows reads one item's row, includeNotes adds each item's notes (HTML). Plan by name\nwhen a client has several. Filters: status label, open (not completed), year, calendar quarter. When to use:\n'what is on Contoso's plan for Q4', 'total planned one-time spend per client'. Not here: initiative items — use\nquery_initiatives; PSA projects — use query_projects; a report's plan (the snapshot a report part carries) is\nnot read here; a client's whole picture — use brief.",
        "description": "Plan items for one client's plan or across clients: counts by status, by quarter and by client, one-time and\nrecurring budget totals, and the items on request. Rows carry the item id, part, parent id, path, position and\nassignee; itemId with detail=rows reads one item's row, includeNotes adds each item's notes (HTML). Plan by name\nwhen a client has several. Filters: status label, open (not completed), year, calendar quarter. When to use:\n'what is on Contoso's plan for Q4', 'total planned one-time spend per client'. Not here: initiative items — use\nquery_initiatives; PSA projects — use query_projects; a report's plan (the snapshot a report part carries) is\nnot read here; a client's whole picture — use brief.",
        "operationId": "query_plans",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryPlansInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryPlansResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/query_technology": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Technology and asset questions across clients: counts and lists of computers, servers, firewalls and other tracked\ntechnology, for one client or all. Category by technology type or group name; filters by OS, age, warranty expiry,\npurchase date, grade and source; group by site, client, category or OS. Counts by default; detail=rows lists the\nitems (name, OS, age, purchase, warranty, grade, make, model, last user), paged. When to use: 'how many computers\nover 4 years at Contoso', 'machines still on Windows 10 across all clients'. Not here: security practices and\nwhether a control is in place (ITDR, EDR, backup policy) — use query_assessment; Microsoft 365 users and\nlicences — use query_m365_users.",
        "description": "Technology and asset questions across clients: counts and lists of computers, servers, firewalls and other tracked\ntechnology, for one client or all. Category by technology type or group name; filters by OS, age, warranty expiry,\npurchase date, grade and source; group by site, client, category or OS. Counts by default; detail=rows lists the\nitems (name, OS, age, purchase, warranty, grade, make, model, last user), paged. When to use: 'how many computers\nover 4 years at Contoso', 'machines still on Windows 10 across all clients'. Not here: security practices and\nwhether a control is in place (ITDR, EDR, backup policy) — use query_assessment; Microsoft 365 users and\nlicences — use query_m365_users.",
        "operationId": "query_technology",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryTechnologyInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryTechnologyResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/query_goals": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Goals for one client or all clients: counts by status (Planned, On track, At risk, Done), by target quarter and by\nclient, with the average progress of tracked goals, and the goals themselves on request. Filters: status, owner\n(full name), open (not Done), targetYear and calendar targetQuarter of the target date, overdue (target date\npassed, not Done). detail=rows lists each goal with status, progress, dates, owner, template and how many\ninitiatives, plans and plan items it is linked to. When to use: 'which of Contoso's goals are at risk', 'goals due\nthis quarter'. Not here: changing a goal — update_goal / create_goal; initiatives — query_initiatives;\nplans — query_plans; a client's whole picture — brief.",
        "description": "Goals for one client or all clients: counts by status (Planned, On track, At risk, Done), by target quarter and by\nclient, with the average progress of tracked goals, and the goals themselves on request. Filters: status, owner\n(full name), open (not Done), targetYear and calendar targetQuarter of the target date, overdue (target date\npassed, not Done). detail=rows lists each goal with status, progress, dates, owner, template and how many\ninitiatives, plans and plan items it is linked to. When to use: 'which of Contoso's goals are at risk', 'goals due\nthis quarter'. Not here: changing a goal — update_goal / create_goal; initiatives — query_initiatives;\nplans — query_plans; a client's whole picture — brief.",
        "operationId": "query_goals",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryGoalsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryGoalsResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/query_projects": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Projects from the PSA (ConnectWise), synced or not, for one client or all clients: counts by status (Open, On\nhold, Closed), by board and by client, and the projects themselves on request. Filters: status (the PSA status\nname), board, manager, open (not Closed), internal (own flag or an internal status, type or board), synced (still\nmapped to the PSA), year and calendar quarter of the estimated completion date, overdue (estimated completion\npassed, not Closed).\ndetail=rows lists each project with status, dates, percent complete, hours, budget, manager, type, board, the\nInternal flags, sync state and how many initiatives and plan items it is linked to.\nWhen to use: 'which of Contoso's projects are overdue', 'open projects per client'.\nNot here: changing a project — update_project (Internal flag), link_project; initiatives — query_initiatives;\nplans — query_plans; a client's whole picture — brief.",
        "description": "Projects from the PSA (ConnectWise), synced or not, for one client or all clients: counts by status (Open, On\nhold, Closed), by board and by client, and the projects themselves on request. Filters: status (the PSA status\nname), board, manager, open (not Closed), internal (own flag or an internal status, type or board), synced (still\nmapped to the PSA), year and calendar quarter of the estimated completion date, overdue (estimated completion\npassed, not Closed).\ndetail=rows lists each project with status, dates, percent complete, hours, budget, manager, type, board, the\nInternal flags, sync state and how many initiatives and plan items it is linked to.\nWhen to use: 'which of Contoso's projects are overdue', 'open projects per client'.\nNot here: changing a project — update_project (Internal flag), link_project; initiatives — query_initiatives;\nplans — query_plans; a client's whole picture — brief.",
        "operationId": "query_projects",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryProjectsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryProjectsResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ai/query_proposals": {
      "post": {
        "tags": [
          "Ai"
        ],
        "summary": "Proposals (PSA opportunities, synced from ConnectWise) for one client or all clients: counts by base status (Open,\nAccepted, Declined), by stage and by client, each with its amount total, and the proposals themselves on request.\nFilters: status and stage (PSA names), owner (sales rep), open (not closed), internal (the proposal, its status or\nits stage marked internal), year and calendar quarter of the expected close date, overdue (expected close date\npassed, not closed). detail=rows lists each proposal with status, stage, type, base status, whether it is closed,\namount, recurring amount, probability, expected close date, owner, the Internal mark and how many initiative items\nand plan items it is linked to. Amounts are the PSA's numbers; no currency is carried.\nWhen to use: 'what is in Contoso's pipeline', 'proposals closing this quarter'.\nNot here: projects — query_projects; initiatives — query_initiatives; a client's whole picture — brief.",
        "description": "Proposals (PSA opportunities, synced from ConnectWise) for one client or all clients: counts by base status (Open,\nAccepted, Declined), by stage and by client, each with its amount total, and the proposals themselves on request.\nFilters: status and stage (PSA names), owner (sales rep), open (not closed), internal (the proposal, its status or\nits stage marked internal), year and calendar quarter of the expected close date, overdue (expected close date\npassed, not closed). detail=rows lists each proposal with status, stage, type, base status, whether it is closed,\namount, recurring amount, probability, expected close date, owner, the Internal mark and how many initiative items\nand plan items it is linked to. Amounts are the PSA's numbers; no currency is carried.\nWhen to use: 'what is in Contoso's pipeline', 'proposals closing this quarter'.\nNot here: projects — query_projects; initiatives — query_initiatives; a client's whole picture — brief.",
        "operationId": "query_proposals",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryProposalsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryProposalsResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assessment/items": {
      "get": {
        "tags": [
          "Assessment"
        ],
        "summary": "Lists assessment items across ALL reports you can see, one row per item with its company and\nreport, ordered by company id, report id, then group and item order. reportScope picks the reports:\nlatestPerCompany (default), latestDraftPerCompany, latestCompletedPerCompany or all. \"Latest\" is\nthe newest by reportDate, across templates unless templateIdIn narrows it. Archived reports are\nexcluded from every scope. Item filters, at least one required (400 validationFailed otherwise):\ntemplateItemId/templateItemIdIn, nameEquals/nameContains. Other filters: gradeIsDefault,\nstatusIsEmpty, templateGradeIdIn, companyIdIn, templateIdIn, reportDateAfter/Before.\nWhen to use: one item across many clients (\"which clients have Backup ungraded\") — instead of\nlistReportAssessmentItems once per report.\nNext: getAssessmentItemsSummary for the counts alone; a row's reportId + itemId are what\ngetReportAssessmentItem and patchReportAssessmentItem take.",
        "description": "Lists assessment items across ALL reports you can see, one row per item with its company and\nreport, ordered by company id, report id, then group and item order. reportScope picks the reports:\nlatestPerCompany (default), latestDraftPerCompany, latestCompletedPerCompany or all. \"Latest\" is\nthe newest by reportDate, across templates unless templateIdIn narrows it. Archived reports are\nexcluded from every scope. Item filters, at least one required (400 validationFailed otherwise):\ntemplateItemId/templateItemIdIn, nameEquals/nameContains. Other filters: gradeIsDefault,\nstatusIsEmpty, templateGradeIdIn, companyIdIn, templateIdIn, reportDateAfter/Before.\nWhen to use: one item across many clients (\"which clients have Backup ungraded\") — instead of\nlistReportAssessmentItems once per report.\nNext: getAssessmentItemsSummary for the counts alone; a row's reportId + itemId are what\ngetReportAssessmentItem and patchReportAssessmentItem take.",
        "operationId": "listAssessmentItems",
        "parameters": [
          {
            "name": "ReportScope",
            "in": "query",
            "description": "Which of your reports are read: latestPerCompany (default) = each company's newest report, the one listReports latestPerCompany returns, so a company whose newest report is archived has none in scope; latestDraftPerCompany = its newest draft; latestCompletedPerCompany = its newest completed report; all = every draft and completed report. Newest = latest reportDate, the highest id breaking a tie, across templates (add templateIdIn for one template). Archived reports are never read: their items are not in the live tables.",
            "schema": {
              "enum": [
                "latestPerCompany",
                "latestDraftPerCompany",
                "latestCompletedPerCompany",
                "all"
              ],
              "type": "string",
              "description": "Which of your reports are read: latestPerCompany (default) = each company's newest report, the one listReports latestPerCompany returns, so a company whose newest report is archived has none in scope; latestDraftPerCompany = its newest draft; latestCompletedPerCompany = its newest completed report; all = every draft and completed report. Newest = latest reportDate, the highest id breaking a tie, across templates (add templateIdIn for one template). Archived reports are never read: their items are not in the live tables."
            }
          },
          {
            "name": "CompanyIdIn",
            "in": "query",
            "description": "Read only the reports of these companies (see listCompanies).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Read only the reports of these companies (see listCompanies)."
            }
          },
          {
            "name": "TemplateIdIn",
            "in": "query",
            "description": "Read only the reports created from these assessment templates (the id of a report's template object).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Read only the reports created from these assessment templates (the id of a report's template object)."
            }
          },
          {
            "name": "ReportDateAfter",
            "in": "query",
            "description": "Read only the reports dated on or after this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Read only the reports dated on or after this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "ReportDateBefore",
            "in": "query",
            "description": "Read only the reports dated on or before this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Read only the reports dated on or before this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "TemplateItemId",
            "in": "query",
            "description": "Return only the items created from the template item with this id: the same item across every report of a template. listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains.",
            "schema": {
              "type": "integer",
              "description": "Return only the items created from the template item with this id: the same item across every report of a template. listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains.",
              "format": "int32"
            }
          },
          {
            "name": "TemplateItemIdIn",
            "in": "query",
            "description": "Return only the items created from any of the template items with these ids. listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items created from any of the template items with these ids. listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Return only the items whose name equals this value (case-insensitive). listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains.",
            "schema": {
              "type": "string",
              "description": "Return only the items whose name equals this value (case-insensitive). listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Return only the items whose name contains this value (case-insensitive). listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains.",
            "schema": {
              "type": "string",
              "description": "Return only the items whose name contains this value (case-insensitive). listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains."
            }
          },
          {
            "name": "GradeIsDefault",
            "in": "query",
            "description": "Return only the items whose grade is the template's default grade (true) or has been changed from it (false). Ungraded items (no grade row) are excluded from both true and false.",
            "schema": {
              "type": "boolean",
              "description": "Return only the items whose grade is the template's default grade (true) or has been changed from it (false). Ungraded items (no grade row) are excluded from both true and false."
            }
          },
          {
            "name": "StatusIsEmpty",
            "in": "query",
            "description": "Return only the items whose status is empty (true) or non-empty (false). A status of only spaces counts as empty.",
            "schema": {
              "type": "boolean",
              "description": "Return only the items whose status is empty (true) or non-empty (false). A status of only spaces counts as empty."
            }
          },
          {
            "name": "TemplateGradeIdIn",
            "in": "query",
            "description": "Return only the items graded with any of the template grades with these ids (see listReportAssessmentGrades).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items graded with any of the template grades with these ids (see listReportAssessmentGrades)."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'itemId' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "companyId",
                  "companyName",
                  "reportId",
                  "reportDate",
                  "reportStatusEnum",
                  "itemId",
                  "templateItemId",
                  "name",
                  "status",
                  "risk",
                  "solution",
                  "oneTimeBudget",
                  "recurringBudget",
                  "grade",
                  "groupId",
                  "groupName"
                ],
                "type": "string",
                "description": "Selectable response fields of a tenant-wide assessment item (used by the fields query parameter). New\nmembers are APPENDED: the parameter also binds an enum member's ordinal, so inserting one in the middle\nwould silently re-point every later number at a different field."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'itemId' field is always included."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssessmentItemResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assessment/items/summary": {
      "get": {
        "tags": [
          "Assessment"
        ],
        "summary": "Counts the matching assessment items across ALL reports you can see, with the same filters and\nreportScope as listAssessmentItems and no paging: companies you can see, withReport, noReport (no\nreport in scope), notOnReport (a report without a matching item), graded (grade changed from the\ntemplate default), ungraded (default grade or none) and byGrade. \"Latest\" is across templates\nunless templateIdIn narrows it. Archived reports are excluded from every scope.\nWhen to use: a portfolio question answered by numbers (\"how many clients have Backup ungraded\")\nin one request. The four buckets add up to companies only when every company has at most one\nmatching item on its scoped report; templateItemId with a latest scope usually gives that.\nNo item filter is required, but this is the heaviest call on the surface: add templateItemId when you can.\nNext: listAssessmentItems with the same filters for the rows behind the counts.",
        "description": "Counts the matching assessment items across ALL reports you can see, with the same filters and\nreportScope as listAssessmentItems and no paging: companies you can see, withReport, noReport (no\nreport in scope), notOnReport (a report without a matching item), graded (grade changed from the\ntemplate default), ungraded (default grade or none) and byGrade. \"Latest\" is across templates\nunless templateIdIn narrows it. Archived reports are excluded from every scope.\nWhen to use: a portfolio question answered by numbers (\"how many clients have Backup ungraded\")\nin one request. The four buckets add up to companies only when every company has at most one\nmatching item on its scoped report; templateItemId with a latest scope usually gives that.\nNo item filter is required, but this is the heaviest call on the surface: add templateItemId when you can.\nNext: listAssessmentItems with the same filters for the rows behind the counts.",
        "operationId": "getAssessmentItemsSummary",
        "parameters": [
          {
            "name": "ReportScope",
            "in": "query",
            "description": "Which of your reports are read: latestPerCompany (default) = each company's newest report, the one listReports latestPerCompany returns, so a company whose newest report is archived has none in scope; latestDraftPerCompany = its newest draft; latestCompletedPerCompany = its newest completed report; all = every draft and completed report. Newest = latest reportDate, the highest id breaking a tie, across templates (add templateIdIn for one template). Archived reports are never read: their items are not in the live tables.",
            "schema": {
              "enum": [
                "latestPerCompany",
                "latestDraftPerCompany",
                "latestCompletedPerCompany",
                "all"
              ],
              "type": "string",
              "description": "Which of your reports are read: latestPerCompany (default) = each company's newest report, the one listReports latestPerCompany returns, so a company whose newest report is archived has none in scope; latestDraftPerCompany = its newest draft; latestCompletedPerCompany = its newest completed report; all = every draft and completed report. Newest = latest reportDate, the highest id breaking a tie, across templates (add templateIdIn for one template). Archived reports are never read: their items are not in the live tables."
            }
          },
          {
            "name": "CompanyIdIn",
            "in": "query",
            "description": "Read only the reports of these companies (see listCompanies).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Read only the reports of these companies (see listCompanies)."
            }
          },
          {
            "name": "TemplateIdIn",
            "in": "query",
            "description": "Read only the reports created from these assessment templates (the id of a report's template object).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Read only the reports created from these assessment templates (the id of a report's template object)."
            }
          },
          {
            "name": "ReportDateAfter",
            "in": "query",
            "description": "Read only the reports dated on or after this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Read only the reports dated on or after this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "ReportDateBefore",
            "in": "query",
            "description": "Read only the reports dated on or before this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Read only the reports dated on or before this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "TemplateItemId",
            "in": "query",
            "description": "Return only the items created from the template item with this id: the same item across every report of a template. listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains.",
            "schema": {
              "type": "integer",
              "description": "Return only the items created from the template item with this id: the same item across every report of a template. listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains.",
              "format": "int32"
            }
          },
          {
            "name": "TemplateItemIdIn",
            "in": "query",
            "description": "Return only the items created from any of the template items with these ids. listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items created from any of the template items with these ids. listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Return only the items whose name equals this value (case-insensitive). listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains.",
            "schema": {
              "type": "string",
              "description": "Return only the items whose name equals this value (case-insensitive). listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Return only the items whose name contains this value (case-insensitive). listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains.",
            "schema": {
              "type": "string",
              "description": "Return only the items whose name contains this value (case-insensitive). listAssessmentItems requires at least one of templateItemId, templateItemIdIn, nameEquals or nameContains."
            }
          },
          {
            "name": "GradeIsDefault",
            "in": "query",
            "description": "Return only the items whose grade is the template's default grade (true) or has been changed from it (false). Ungraded items (no grade row) are excluded from both true and false.",
            "schema": {
              "type": "boolean",
              "description": "Return only the items whose grade is the template's default grade (true) or has been changed from it (false). Ungraded items (no grade row) are excluded from both true and false."
            }
          },
          {
            "name": "StatusIsEmpty",
            "in": "query",
            "description": "Return only the items whose status is empty (true) or non-empty (false). A status of only spaces counts as empty.",
            "schema": {
              "type": "boolean",
              "description": "Return only the items whose status is empty (true) or non-empty (false). A status of only spaces counts as empty."
            }
          },
          {
            "name": "TemplateGradeIdIn",
            "in": "query",
            "description": "Return only the items graded with any of the template grades with these ids (see listReportAssessmentGrades).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items graded with any of the template grades with these ids (see listReportAssessmentGrades)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssessmentItemsSummaryResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Companies": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Lists the companies visible to the caller (tenant scope + the caller's group/direct\nassignment rules), with typed filters, sorting, paging and field selection.\nWhen to use: the entry point of the company domain — it needs no id, so start here whenever a\ncompanyId is not already in hand.\nNext: the companyId on each row is taken by getCompany, patchCompany and patchCompanies\n(entityIds), and by createReport (companyId) and the companyId filter of listReports, listPlans\nand listTechnologyItems.",
        "description": "Lists the companies visible to the caller (tenant scope + the caller's group/direct\nassignment rules), with typed filters, sorting, paging and field selection.\nWhen to use: the entry point of the company domain — it needs no id, so start here whenever a\ncompanyId is not already in hand.\nNext: the companyId on each row is taken by getCompany, patchCompany and patchCompanies\n(entityIds), and by createReport (companyId) and the companyId filter of listReports, listPlans\nand listTechnologyItems.",
        "operationId": "listCompanies",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Companies whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Companies whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Companies whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Companies whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Companies whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Companies whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Companies whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Companies whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the company with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the company with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the companies with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the companies with these ids."
            }
          },
          {
            "name": "CompanyStatusId",
            "in": "query",
            "description": "Filter by company status lookup id (see listCompanyStatuses).",
            "schema": {
              "type": "integer",
              "description": "Filter by company status lookup id (see listCompanyStatuses).",
              "format": "int32"
            }
          },
          {
            "name": "CompanyStatusIdIn",
            "in": "query",
            "description": "Companies whose status id is any of these values (see listCompanyStatuses).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Companies whose status id is any of these values (see listCompanyStatuses)."
            }
          },
          {
            "name": "MarketId",
            "in": "query",
            "description": "Companies associated with this market id (see listCompanyMarkets).",
            "schema": {
              "type": "integer",
              "description": "Companies associated with this market id (see listCompanyMarkets).",
              "format": "int32"
            }
          },
          {
            "name": "MarketIdIn",
            "in": "query",
            "description": "Companies associated with any of these market ids (see listCompanyMarkets).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Companies associated with any of these market ids (see listCompanyMarkets)."
            }
          },
          {
            "name": "TypeId",
            "in": "query",
            "description": "Companies associated with this type id (see listCompanyTypes).",
            "schema": {
              "type": "integer",
              "description": "Companies associated with this type id (see listCompanyTypes).",
              "format": "int32"
            }
          },
          {
            "name": "TypeIdIn",
            "in": "query",
            "description": "Companies associated with any of these type ids (see listCompanyTypes).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Companies associated with any of these type ids (see listCompanyTypes)."
            }
          },
          {
            "name": "GroupId",
            "in": "query",
            "description": "Companies associated with this group id (see listCompanyGroups).",
            "schema": {
              "type": "integer",
              "description": "Companies associated with this group id (see listCompanyGroups).",
              "format": "int32"
            }
          },
          {
            "name": "GroupIdIn",
            "in": "query",
            "description": "Companies associated with any of these group ids (see listCompanyGroups).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Companies associated with any of these group ids (see listCompanyGroups)."
            }
          },
          {
            "name": "StartDateAfter",
            "in": "query",
            "description": "Companies whose start date is on or after this (UTC).",
            "schema": {
              "type": "string",
              "description": "Companies whose start date is on or after this (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "StartDateBefore",
            "in": "query",
            "description": "Companies whose start date is on or before this (UTC).",
            "schema": {
              "type": "string",
              "description": "Companies whose start date is on or before this (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "EndDateAfter",
            "in": "query",
            "description": "Companies whose end date is on or after this (UTC).",
            "schema": {
              "type": "string",
              "description": "Companies whose end date is on or after this (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "EndDateBefore",
            "in": "query",
            "description": "Companies whose end date is on or before this (UTC).",
            "schema": {
              "type": "string",
              "description": "Companies whose end date is on or before this (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for companies (indexed/cheap columns only). Allowed values: Name,\nStartDate.",
            "schema": {
              "enum": [
                "name",
                "startDate"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for companies (indexed/cheap columns only). Allowed values: Name,\nStartDate."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "description",
                  "status",
                  "startDate",
                  "endDate",
                  "websiteUrl",
                  "fiscalYearStartMonth",
                  "markets",
                  "types",
                  "groups",
                  "users"
                ],
                "type": "string",
                "description": "Selectable response fields of a company (used by the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Creates a company for the caller's client and returns it. Requires a name, a client status\nand (for non-admin callers) at least one group. Refused with a 400 validationFailed while the\nclient is at its subscription plan's company limit.\nWhen to use: resolve the body lookup ids first — companyStatusId from listCompanyStatuses,\ngroupIds from listCompanyGroups, typeIds from listCompanyTypes, marketIds and primaryMarketId\nfrom listCompanyMarkets.\nNext: the returned id is the companyId taken by getCompany, patchCompany and createReport.\nNot here: groupIds are territories, the groups listCompanyGroups returns — not the\nflexible-items groups of listTechnologyGroups.",
        "description": "Creates a company for the caller's client and returns it. Requires a name, a client status\nand (for non-admin callers) at least one group. Refused with a 400 validationFailed while the\nclient is at its subscription plan's company limit.\nWhen to use: resolve the body lookup ids first — companyStatusId from listCompanyStatuses,\ngroupIds from listCompanyGroups, typeIds from listCompanyTypes, marketIds and primaryMarketId\nfrom listCompanyMarkets.\nNext: the returned id is the companyId taken by getCompany, patchCompany and createReport.\nNot here: groupIds are territories, the groups listCompanyGroups returns — not the\nflexible-items groups of listTechnologyGroups.",
        "operationId": "createCompany",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Companies"
        ],
        "summary": "Applies ONE JSON Patch to many companies by explicit id. Partial success: updated companies return\nin items, the rest as per-id errors. The subscription plan's company limit is checked once, before\nany write: exceeding it, or any patch not making the companies inactive while the client is already\nover it, is one 400 validationFailed that changes nothing. Body (application/json):\n{ entityIds: number[], patch: [RFC 6902 ops] }, at most 100 ids (configurable). Paths are\nPascalCase: /Status, /Markets, /Types, /Groups, /PrimaryMarket, /FiscalYearStartMonthEnum,\n/StartDate, /EndDate. Send an Idempotency-Key to make retries safe.\nWhen to use: the same change for several companies; entityIds come from listCompanies, never a\nfilter.\nNext: path values come from listCompanyStatuses, listCompanyGroups (territories), listCompanyTypes\nand listCompanyMarkets.\nNot here: patchCompany (one company) takes camelCase paths; a document for one is silently wrong in\nthe other.",
        "description": "Applies ONE JSON Patch to many companies by explicit id. Partial success: updated companies return\nin items, the rest as per-id errors. The subscription plan's company limit is checked once, before\nany write: exceeding it, or any patch not making the companies inactive while the client is already\nover it, is one 400 validationFailed that changes nothing. Body (application/json):\n{ entityIds: number[], patch: [RFC 6902 ops] }, at most 100 ids (configurable). Paths are\nPascalCase: /Status, /Markets, /Types, /Groups, /PrimaryMarket, /FiscalYearStartMonthEnum,\n/StartDate, /EndDate. Send an Idempotency-Key to make retries safe.\nWhen to use: the same change for several companies; entityIds come from listCompanies, never a\nfilter.\nNext: path values come from listCompanyStatuses, listCompanyGroups (territories), listCompanyTypes\nand listCompanyMarkets.\nNot here: patchCompany (one company) takes camelCase paths; a document for one is silently wrong in\nthe other.",
        "operationId": "patchCompanies",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyBulkPatchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyBulkPatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Companies/{id}": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Returns one company visible to the caller by id (all public fields).\nWhen to use: a companyId is already known and the whole public field set is wanted;\nlistCompanies is the form that discovers, filters and trims fields.\nNext: patchCompany updates this same company, and createReport takes this companyId.",
        "description": "Returns one company visible to the caller by id (all public fields).\nWhen to use: a companyId is already known and the whole public field set is wanted;\nlistCompanies is the form that discovers, filters and trims fields.\nNext: patchCompany updates this same company, and createReport takes this companyId.",
        "operationId": "getCompany",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Companies"
        ],
        "summary": "Applies a JSON Patch document to a company visible to the caller and returns the updated\nresource. Refused with a 400 validationFailed when the change would take the client past its\nsubscription plan's company limit (an inactive company moved to an active status), or while the\nclient is already over that limit and the patch does not make the company inactive.\nWhen to use: one company at a time; the paths here are camelCase (/status, /groups, /markets,\n/primaryMarket, /types, /startDate, /endDate, /fiscalYearStartMonthEnum).\nNext: the /status, /groups, /types, /markets and /primaryMarket values come from\nlistCompanyStatuses, listCompanyGroups, listCompanyTypes and listCompanyMarkets.\nNot here: patchCompanies applies one patch to many companies by explicit id, and its paths are\nPascalCase — a document written for one of the two is silently wrong in the other.",
        "description": "Applies a JSON Patch document to a company visible to the caller and returns the updated\nresource. Refused with a 400 validationFailed when the change would take the client past its\nsubscription plan's company limit (an inactive company moved to an active status), or while the\nclient is already over that limit and the patch does not make the company inactive.\nWhen to use: one company at a time; the paths here are camelCase (/status, /groups, /markets,\n/primaryMarket, /types, /startDate, /endDate, /fiscalYearStartMonthEnum).\nNext: the /status, /groups, /types, /markets and /primaryMarket values come from\nlistCompanyStatuses, listCompanyGroups, listCompanyTypes and listCompanyMarkets.\nNot here: patchCompanies applies one patch to many companies by explicit id, and its paths are\nPascalCase — a document written for one of the two is silently wrong in the other.",
        "operationId": "patchCompany",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Companies/{id}/groups": {
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Adds one or more groups to a company and returns the company, exactly as getCompany reads it.\nWhen to use: to give a company to a group without resending its whole group list. groupIds come\nfrom listCompanyGroups; an id outside your tenant is not found and NOTHING is written. A group\nalready on the company is accepted and left untouched, so a repeated call is safe. Send an\nIdempotency-Key so a retry replays the first response.\nNext: removeCompanyGroup takes one group away; getCompany shows the current set.\nNot here: creating a group (createCompanyGroup) and replacing the whole set (patchCompany /groups).",
        "description": "Adds one or more groups to a company and returns the company, exactly as getCompany reads it.\nWhen to use: to give a company to a group without resending its whole group list. groupIds come\nfrom listCompanyGroups; an id outside your tenant is not found and NOTHING is written. A group\nalready on the company is accepted and left untouched, so a repeated call is safe. Send an\nIdempotency-Key so a retry replays the first response.\nNext: removeCompanyGroup takes one group away; getCompany shows the current set.\nNot here: creating a group (createCompanyGroup) and replacing the whole set (patchCompany /groups).",
        "operationId": "addCompanyGroups",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyGroupsAddInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Companies/{id}/groups/{groupId}": {
      "delete": {
        "tags": [
          "Companies"
        ],
        "summary": "Removes one group from a company and returns no content.\nWhen to use: to take a company out of a group. The groupId comes from getCompany; a group that is\nnot on the company is reported as not found, so a second delete is not found rather than a\nsilent success. A caller who is not an Admin cannot remove the company's last group.\nNext: getCompany no longer lists the group; addCompanyGroups puts it back.\nNot here: deleting the group itself (deleteCompanyGroup).",
        "description": "Removes one group from a company and returns no content.\nWhen to use: to take a company out of a group. The groupId comes from getCompany; a group that is\nnot on the company is reported as not found, so a second delete is not found rather than a\nsilent success. A caller who is not an Admin cannot remove the company's last group.\nNext: getCompany no longer lists the group; addCompanyGroups puts it back.\nNot here: deleting the group itself (deleteCompanyGroup).",
        "operationId": "removeCompanyGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Companies/{id}/markets": {
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Adds one or more markets to a company and returns the company, exactly as getCompany reads it.\nWhen to use: to tag a company with a market without resending its whole market list. marketIds\ncome from listCompanyMarkets; an id outside your tenant is not found and NOTHING is written. A\nmarket already on the company is accepted and left untouched. Send an Idempotency-Key so a\nretry replays the first response.\nNext: updateCompanyPrimaryMarket makes one of them primary; removeCompanyMarket takes one away.\nNot here: creating a market (createCompanyMarket) and replacing the whole set (patchCompany /markets).",
        "description": "Adds one or more markets to a company and returns the company, exactly as getCompany reads it.\nWhen to use: to tag a company with a market without resending its whole market list. marketIds\ncome from listCompanyMarkets; an id outside your tenant is not found and NOTHING is written. A\nmarket already on the company is accepted and left untouched. Send an Idempotency-Key so a\nretry replays the first response.\nNext: updateCompanyPrimaryMarket makes one of them primary; removeCompanyMarket takes one away.\nNot here: creating a market (createCompanyMarket) and replacing the whole set (patchCompany /markets).",
        "operationId": "addCompanyMarkets",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyMarketsAddInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Companies/{id}/markets/{marketId}": {
      "delete": {
        "tags": [
          "Companies"
        ],
        "summary": "Removes one market from a company and returns no content.\nWhen to use: to untag a company from a market. The marketId comes from getCompany; a market that\nis not on the company is reported as not found. Removing the primary market also clears the\ncompany's primary. A company mapped to a PSA integration keeps its primary market locked, and\nthe removal is refused with a message naming the lock.\nNext: getCompany no longer lists the market; addCompanyMarkets puts it back.\nNot here: deleting the market itself (deleteCompanyMarket).",
        "description": "Removes one market from a company and returns no content.\nWhen to use: to untag a company from a market. The marketId comes from getCompany; a market that\nis not on the company is reported as not found. Removing the primary market also clears the\ncompany's primary. A company mapped to a PSA integration keeps its primary market locked, and\nthe removal is refused with a message naming the lock.\nNext: getCompany no longer lists the market; addCompanyMarkets puts it back.\nNot here: deleting the market itself (deleteCompanyMarket).",
        "operationId": "removeCompanyMarket",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "marketId",
            "in": "path",
            "description": "Company market id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Companies/{id}/primaryMarket": {
      "put": {
        "tags": [
          "Companies"
        ],
        "summary": "Sets the company's primary market and returns the company, exactly as getCompany reads it.\nWhen to use: to choose which of the company's markets is primary. The marketId must already be\none of the company's markets (addCompanyMarkets first); otherwise the request is refused.\nSetting the market that is already primary is accepted and changes nothing. Send an\nIdempotency-Key so a retry replays the first response.\nNext: getCompany shows isPrimary on the chosen market; removeCompanyPrimaryMarket clears it.\nNot here: adding the market to the company.",
        "description": "Sets the company's primary market and returns the company, exactly as getCompany reads it.\nWhen to use: to choose which of the company's markets is primary. The marketId must already be\none of the company's markets (addCompanyMarkets first); otherwise the request is refused.\nSetting the market that is already primary is accepted and changes nothing. Send an\nIdempotency-Key so a retry replays the first response.\nNext: getCompany shows isPrimary on the chosen market; removeCompanyPrimaryMarket clears it.\nNot here: adding the market to the company.",
        "operationId": "updateCompanyPrimaryMarket",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyPrimaryMarketInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Companies"
        ],
        "summary": "Clears the company's primary market and returns no content. The market stays on the company.\nWhen to use: when the company should have no primary market for a while. A company with no\nprimary market is reported as not found. A company mapped to a PSA integration keeps its\nprimary market locked, and the request is refused with a message naming the lock.\nNext: getCompany shows no isPrimary market; updateCompanyPrimaryMarket sets one again.\nNot here: removing the market from the company (removeCompanyMarket).",
        "description": "Clears the company's primary market and returns no content. The market stays on the company.\nWhen to use: when the company should have no primary market for a while. A company with no\nprimary market is reported as not found. A company mapped to a PSA integration keeps its\nprimary market locked, and the request is refused with a message naming the lock.\nNext: getCompany shows no isPrimary market; updateCompanyPrimaryMarket sets one again.\nNot here: removing the market from the company (removeCompanyMarket).",
        "operationId": "removeCompanyPrimaryMarket",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Companies/{id}/schedules/{templateId}/primaryUser": {
      "put": {
        "tags": [
          "Companies"
        ],
        "summary": "Sets the company's primary user (the template labels them, e.g. \"vCIO\") for one template and year,\nand returns the schedule entry exactly as listGroupTemplateSchedules reads it.\nWhen to use: to assign or change who looks after this company on a template. userId comes from\nlistUsers; a user of another tenant is not found, and a user who cannot see the company is refused.\nyear defaults to the current year; an entry that does not exist yet is created with one report per\nyear. Setting the same user again changes nothing. Send an Idempotency-Key so a retry replays the\nfirst response.\nNext: listGroupTemplateSchedules shows every company's primary user for the template.\nNot here: clearing the primary user, and setting it for many companies\n(updateGroupTemplateSchedulePrimaryUser).",
        "description": "Sets the company's primary user (the template labels them, e.g. \"vCIO\") for one template and year,\nand returns the schedule entry exactly as listGroupTemplateSchedules reads it.\nWhen to use: to assign or change who looks after this company on a template. userId comes from\nlistUsers; a user of another tenant is not found, and a user who cannot see the company is refused.\nyear defaults to the current year; an entry that does not exist yet is created with one report per\nyear. Setting the same user again changes nothing. Send an Idempotency-Key so a retry replays the\nfirst response.\nNext: listGroupTemplateSchedules shows every company's primary user for the template.\nNot here: clearing the primary user, and setting it for many companies\n(updateGroupTemplateSchedulePrimaryUser).",
        "operationId": "updateCompanySchedulePrimaryUser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchedulePrimaryUserInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateScheduleResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/CompanyGroups": {
      "get": {
        "tags": [
          "CompanyGroups"
        ],
        "summary": "Lists the company groups visible to the caller (all client groups for admins; assigned\ngroups only for other users), with typed filters, sorting, paging and field selection.\nNext: returns the territory groupId taken by createCompany.groupIds, patchCompanies /Groups,\nlistCompanies?groupId and listUsers?groupId.\nNot here: a company group is a territory. A technology group is listTechnologyGroups (module\nscope) or listReportTechnologyGroups (report part); a report's assessment category is\nlistReportAssessmentGroups.",
        "description": "Lists the company groups visible to the caller (all client groups for admins; assigned\ngroups only for other users), with typed filters, sorting, paging and field selection.\nNext: returns the territory groupId taken by createCompany.groupIds, patchCompanies /Groups,\nlistCompanies?groupId and listUsers?groupId.\nNot here: a company group is a territory. A technology group is listTechnologyGroups (module\nscope) or listReportTechnologyGroups (report part); a report's assessment category is\nlistReportAssessmentGroups.",
        "operationId": "listCompanyGroups",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Groups whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Groups whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Groups whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Groups whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Groups whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Groups whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Groups whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Groups whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the group with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the group with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the groups with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the groups with these ids."
            }
          },
          {
            "name": "IsDefault",
            "in": "query",
            "description": "Filter by the default flag.",
            "schema": {
              "type": "boolean",
              "description": "Filter by the default flag."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for company groups (indexed/cheap columns only). Allowed values:\nName.",
            "schema": {
              "enum": [
                "name"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for company groups (indexed/cheap columns only). Allowed values:\nName."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "description",
                  "isDefault",
                  "userIds"
                ],
                "type": "string",
                "description": "Selectable response fields of a company group (used by the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyGroupResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "CompanyGroups"
        ],
        "summary": "Creates a company group for the caller's client and returns it.\nNext: the body userIds are the string GUIDs from listUsers; the new groupId is then taken by\ncreateCompany.groupIds and patchCompanies /Groups.",
        "description": "Creates a company group for the caller's client and returns it.\nNext: the body userIds are the string GUIDs from listUsers; the new groupId is then taken by\ncreateCompany.groupIds and patchCompanies /Groups.",
        "operationId": "createCompanyGroup",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyGroupInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyGroupResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/CompanyGroups/{id}": {
      "get": {
        "tags": [
          "CompanyGroups"
        ],
        "summary": "Returns one company group visible to the caller by id (all public fields).\nNext: updateCompanyGroup is the only way to modify it — there is no patchCompanyGroup, so the\nbody must carry the whole group, user assignments included.",
        "description": "Returns one company group visible to the caller by id (all public fields).\nNext: updateCompanyGroup is the only way to modify it — there is no patchCompanyGroup, so the\nbody must carry the whole group, user assignments included.",
        "operationId": "getCompanyGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company group (territory) id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyGroupResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "CompanyGroups"
        ],
        "summary": "Replaces a company group of the caller's client (including its user assignments) and\nreturns the updated resource.\nWhen to use: the only modify path for a group — there is no patchCompanyGroup, so changing\none field still means sending the whole group, including the userIds from listUsers.",
        "description": "Replaces a company group of the caller's client (including its user assignments) and\nreturns the updated resource.\nWhen to use: the only modify path for a group — there is no patchCompanyGroup, so changing\none field still means sending the whole group, including the userIds from listUsers.",
        "operationId": "updateCompanyGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company group (territory) id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyGroupInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyGroupResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "CompanyGroups"
        ],
        "summary": "Deletes a company group of the caller's client. The delete is permanent — there is no undo\nor restore. The default group, the last remaining group, or a group used by companies cannot\nbe deleted.\nNext: listCompanies?groupId names the companies holding the group; patchCompanies /Groups\nmoves them off it.",
        "description": "Deletes a company group of the caller's client. The delete is permanent — there is no undo\nor restore. The default group, the last remaining group, or a group used by companies cannot\nbe deleted.\nNext: listCompanies?groupId names the companies holding the group; patchCompanies /Groups\nmoves them off it.",
        "operationId": "deleteCompanyGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company group (territory) id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/CompanyMarkets": {
      "get": {
        "tags": [
          "CompanyMarkets"
        ],
        "summary": "Lists the company markets of the caller's client, with typed filters, sorting, paging\nand field selection.\nWhen to use: this lookup is open to any authenticated caller — only creating, replacing,\npatching or deleting a market needs Admin or Manager.\nNext: returns the marketId taken by createCompany.marketIds and .primaryMarketId,\npatchCompanies /Markets and /PrimaryMarket, listCompanies?marketId and\nlistReportAssessmentGroups?marketId.",
        "description": "Lists the company markets of the caller's client, with typed filters, sorting, paging\nand field selection.\nWhen to use: this lookup is open to any authenticated caller — only creating, replacing,\npatching or deleting a market needs Admin or Manager.\nNext: returns the marketId taken by createCompany.marketIds and .primaryMarketId,\npatchCompanies /Markets and /PrimaryMarket, listCompanies?marketId and\nlistReportAssessmentGroups?marketId.",
        "operationId": "listCompanyMarkets",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Markets whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Markets whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Markets whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Markets whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Markets whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Markets whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Markets whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Markets whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the market with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the market with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the markets with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the markets with these ids."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for company markets (indexed/cheap columns only). Allowed values:\nName.",
            "schema": {
              "enum": [
                "name"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for company markets (indexed/cheap columns only). Allowed values:\nName."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "description"
                ],
                "type": "string",
                "description": "Selectable response fields of a company market (used by the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyMarketResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "CompanyMarkets"
        ],
        "summary": "Creates a company market for the caller's client and returns it.\nNext: returns the marketId taken by createCompany.marketIds and patchCompanies /Markets.",
        "description": "Creates a company market for the caller's client and returns it.\nNext: returns the marketId taken by createCompany.marketIds and patchCompanies /Markets.",
        "operationId": "createCompanyMarket",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyMarketInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyMarketResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/CompanyMarkets/{id}": {
      "get": {
        "tags": [
          "CompanyMarkets"
        ],
        "summary": "Returns one company market of the caller's client by id (all public fields).",
        "description": "Returns one company market of the caller's client by id (all public fields).",
        "operationId": "getCompanyMarket",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company market id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyMarketResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "CompanyMarkets"
        ],
        "summary": "Replaces a company market of the caller's client and returns the updated resource.\nWhen to use: replaces the whole market from one body; use patchCompanyMarket to change only\nselected paths.",
        "description": "Replaces a company market of the caller's client and returns the updated resource.\nWhen to use: replaces the whole market from one body; use patchCompanyMarket to change only\nselected paths.",
        "operationId": "updateCompanyMarket",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company market id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyMarketInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyMarketResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "CompanyMarkets"
        ],
        "summary": "Applies a JSON Patch document to a company market of the caller's client and returns the\nupdated resource.\nWhen to use: changes only the paths named in the RFC 6902 document; use updateCompanyMarket\nto replace the whole market.",
        "description": "Applies a JSON Patch document to a company market of the caller's client and returns the\nupdated resource.\nWhen to use: changes only the paths named in the RFC 6902 document; use updateCompanyMarket\nto replace the whole market.",
        "operationId": "patchCompanyMarket",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company market id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyMarketResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "CompanyMarkets"
        ],
        "summary": "Deletes a company market of the caller's client. The delete is permanent — there is no undo\nor restore. The last remaining market or a market in use by companies or metrics cannot be\ndeleted.\nNext: listCompanies filtered by marketId names the companies still holding the market.",
        "description": "Deletes a company market of the caller's client. The delete is permanent — there is no undo\nor restore. The last remaining market or a market in use by companies or metrics cannot be\ndeleted.\nNext: listCompanies filtered by marketId names the companies still holding the market.",
        "operationId": "deleteCompanyMarket",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company market id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/CompanyStatuses": {
      "get": {
        "tags": [
          "CompanyStatuses"
        ],
        "summary": "Lists the company statuses of the caller's client, with typed filters, sorting, paging\nand field selection.\nWhen to use: call this first when creating a company — createCompany.companyStatusId is\nrequired and must be an id from here. Reading is open to any authenticated caller, while\ncreateCompanyStatus is Admin/Manager only.\nNext: the id feeds createCompany.companyStatusId, patchCompanies /Status and\nlistCompanies?companyStatusId.\nNot here: this is the client-level status lookup on a company, not a report's lifecycle\nstatus (Draft/Completed/Archive — the listReports statusEnum filter) and not the free-text\nstatus of an assessment item (the listReportAssessmentItems statusEquals filter, matched\ncase-insensitively).",
        "description": "Lists the company statuses of the caller's client, with typed filters, sorting, paging\nand field selection.\nWhen to use: call this first when creating a company — createCompany.companyStatusId is\nrequired and must be an id from here. Reading is open to any authenticated caller, while\ncreateCompanyStatus is Admin/Manager only.\nNext: the id feeds createCompany.companyStatusId, patchCompanies /Status and\nlistCompanies?companyStatusId.\nNot here: this is the client-level status lookup on a company, not a report's lifecycle\nstatus (Draft/Completed/Archive — the listReports statusEnum filter) and not the free-text\nstatus of an assessment item (the listReportAssessmentItems statusEquals filter, matched\ncase-insensitively).",
        "operationId": "listCompanyStatuses",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Statuses whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Statuses whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Statuses whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Statuses whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Statuses whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Statuses whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Statuses whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Statuses whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the status with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the status with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the statuses with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the statuses with these ids."
            }
          },
          {
            "name": "IsDefault",
            "in": "query",
            "description": "Filter by the default flag.",
            "schema": {
              "type": "boolean",
              "description": "Filter by the default flag."
            }
          },
          {
            "name": "IsHideCompanies",
            "in": "query",
            "description": "Filter by the hide-companies flag.",
            "schema": {
              "type": "boolean",
              "description": "Filter by the hide-companies flag."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for company statuses (indexed/cheap columns only). Allowed values:\nName.",
            "schema": {
              "enum": [
                "name"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for company statuses (indexed/cheap columns only). Allowed values:\nName."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "isDefault",
                  "isHideCompanies"
                ],
                "type": "string",
                "description": "Selectable response fields of a company status (used by the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyStatusResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "CompanyStatuses"
        ],
        "summary": "Creates a company status for the caller's client and returns it.\nWhen to use: only when listCompanyStatuses holds no status that fits — createCompany takes\nany existing id from that list. Admin or Manager only.\nNext: returns the companyStatusId that createCompany requires.",
        "description": "Creates a company status for the caller's client and returns it.\nWhen to use: only when listCompanyStatuses holds no status that fits — createCompany takes\nany existing id from that list. Admin or Manager only.\nNext: returns the companyStatusId that createCompany requires.",
        "operationId": "createCompanyStatus",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyStatusInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyStatusResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/CompanyStatuses/{id}": {
      "get": {
        "tags": [
          "CompanyStatuses"
        ],
        "summary": "Returns one company status of the caller's client by id (all public fields).",
        "description": "Returns one company status of the caller's client by id (all public fields).",
        "operationId": "getCompanyStatus",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company status id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyStatusResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "CompanyStatuses"
        ],
        "summary": "Replaces a company status of the caller's client and returns the updated resource.\nWhen to use: the whole status is being rewritten; patchCompanyStatus changes single fields\nwith an RFC 6902 document instead. Admin or Manager only.",
        "description": "Replaces a company status of the caller's client and returns the updated resource.\nWhen to use: the whole status is being rewritten; patchCompanyStatus changes single fields\nwith an RFC 6902 document instead. Admin or Manager only.",
        "operationId": "updateCompanyStatus",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company status id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyStatusInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyStatusResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "CompanyStatuses"
        ],
        "summary": "Applies a JSON Patch document to a company status of the caller's client and returns the\nupdated resource.\nWhen to use: only some fields are changing; updateCompanyStatus replaces the whole status\nin one call. Admin or Manager only.",
        "description": "Applies a JSON Patch document to a company status of the caller's client and returns the\nupdated resource.\nWhen to use: only some fields are changing; updateCompanyStatus replaces the whole status\nin one call. Admin or Manager only.",
        "operationId": "patchCompanyStatus",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company status id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyStatusResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "CompanyStatuses"
        ],
        "summary": "Deletes a company status of the caller's client. The delete is permanent — there is no undo\nor restore. Default, last, or in-use statuses cannot be deleted.\nWhen to use: listCompanies?companyStatusId shows which companies still hold the status, and\npatchCompanies /Status moves them off it before this call can succeed. Admin or Manager\nonly.",
        "description": "Deletes a company status of the caller's client. The delete is permanent — there is no undo\nor restore. Default, last, or in-use statuses cannot be deleted.\nWhen to use: listCompanies?companyStatusId shows which companies still hold the status, and\npatchCompanies /Status moves them off it before this call can succeed. Admin or Manager\nonly.",
        "operationId": "deleteCompanyStatus",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company status id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/CompanyTypes": {
      "get": {
        "tags": [
          "CompanyTypes"
        ],
        "summary": "Lists the company types of the caller's client, with typed filters, sorting, paging\nand field selection.\nNext: returns the typeId taken by createCompany.typeIds (optional there), patchCompanies\n/Types and listCompanies?typeId.\nNot here: this is the client-level company-type lookup, not the typeEnum of a technology\ncolumn, a report part or a technology group — those are enum values, not ids from this list.",
        "description": "Lists the company types of the caller's client, with typed filters, sorting, paging\nand field selection.\nNext: returns the typeId taken by createCompany.typeIds (optional there), patchCompanies\n/Types and listCompanies?typeId.\nNot here: this is the client-level company-type lookup, not the typeEnum of a technology\ncolumn, a report part or a technology group — those are enum values, not ids from this list.",
        "operationId": "listCompanyTypes",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Types whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Types whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Types whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Types whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Types whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Types whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Types whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Types whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the type with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the type with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the types with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the types with these ids."
            }
          },
          {
            "name": "IsProspect",
            "in": "query",
            "description": "Filter by the prospect flag.",
            "schema": {
              "type": "boolean",
              "description": "Filter by the prospect flag."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for company types (indexed/cheap columns only). Allowed values:\nName.",
            "schema": {
              "enum": [
                "name"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for company types (indexed/cheap columns only). Allowed values:\nName."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "description",
                  "isProspect"
                ],
                "type": "string",
                "description": "Selectable response fields of a company type (used by the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyTypeResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "CompanyTypes"
        ],
        "summary": "Creates a company type for the caller's client and returns it.\nNext: the returned id is the typeId taken by createCompany.typeIds, patchCompanies /Types\nand listCompanies?typeId.",
        "description": "Creates a company type for the caller's client and returns it.\nNext: the returned id is the typeId taken by createCompany.typeIds, patchCompanies /Types\nand listCompanies?typeId.",
        "operationId": "createCompanyType",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyTypeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyTypeResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/CompanyTypes/{id}": {
      "get": {
        "tags": [
          "CompanyTypes"
        ],
        "summary": "Returns one company type of the caller's client by id (all public fields).\nWhen to use: resolving a typeId already in hand; listCompanyTypes is where such an id is\ndiscovered in the first place.",
        "description": "Returns one company type of the caller's client by id (all public fields).\nWhen to use: resolving a typeId already in hand; listCompanyTypes is where such an id is\ndiscovered in the first place.",
        "operationId": "getCompanyType",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company type id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyTypeResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "CompanyTypes"
        ],
        "summary": "Replaces a company type of the caller's client and returns the updated resource.\nWhen to use: the whole resource is being rewritten and every field is supplied; use\npatchCompanyType to change single fields with an RFC 6902 document.",
        "description": "Replaces a company type of the caller's client and returns the updated resource.\nWhen to use: the whole resource is being rewritten and every field is supplied; use\npatchCompanyType to change single fields with an RFC 6902 document.",
        "operationId": "updateCompanyType",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company type id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyTypeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyTypeResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "CompanyTypes"
        ],
        "summary": "Applies a JSON Patch document to a company type of the caller's client and returns the\nupdated resource.\nWhen to use: changing individual fields; updateCompanyType is the full replacement of the\nsame resource.",
        "description": "Applies a JSON Patch document to a company type of the caller's client and returns the\nupdated resource.\nWhen to use: changing individual fields; updateCompanyType is the full replacement of the\nsame resource.",
        "operationId": "patchCompanyType",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company type id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyTypeResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "CompanyTypes"
        ],
        "summary": "Deletes a company type of the caller's client. The delete is permanent — there is no undo or\nrestore. The last remaining type or a type in use by companies or metrics cannot be deleted.\nNot here: detaching a type from companies — that is patchCompanies /Types; this removes the\nclient-level type itself.",
        "description": "Deletes a company type of the caller's client. The delete is permanent — there is no undo or\nrestore. The last remaining type or a type in use by companies or metrics cannot be deleted.\nNot here: detaching a type from companies — that is patchCompanies /Types; this removes the\nclient-level type itself.",
        "operationId": "deleteCompanyType",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company type id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals": {
      "get": {
        "tags": [
          "Goals"
        ],
        "summary": "Lists the goals of the caller's client, paged (25 by default, at most 100), with filters, sort and\nfield selection, scoped to the companies the caller can see; a company whose status hides companies\nis left out. sortBy=SortOrder (default) keeps each company's goals together in their manual order.\nstatusId takes the four fixed status option ids its description lists; a goal with no status has no\nstatus object and cannot be filtered for. companyId comes from listCompanies, ownerId from listUsers\n(string GUID), templateId from listGoalTemplates.\nWhen to use: goals are one flat client-wide list; no report or part id.\nNext: returns the goalId getGoal and patchGoal take.\nNot here: the goal templates themselves (listGoalTemplates); the initiative items, plans and plan\nitems linked to one goal (listInitiativeItems, listPlans or listPlanItems with goalId). Links are\nadded with linkGoalInitiatives, linkGoalPlans and linkGoalPlanItems and removed with their unlink twins.",
        "description": "Lists the goals of the caller's client, paged (25 by default, at most 100), with filters, sort and\nfield selection, scoped to the companies the caller can see; a company whose status hides companies\nis left out. sortBy=SortOrder (default) keeps each company's goals together in their manual order.\nstatusId takes the four fixed status option ids its description lists; a goal with no status has no\nstatus object and cannot be filtered for. companyId comes from listCompanies, ownerId from listUsers\n(string GUID), templateId from listGoalTemplates.\nWhen to use: goals are one flat client-wide list; no report or part id.\nNext: returns the goalId getGoal and patchGoal take.\nNot here: the goal templates themselves (listGoalTemplates); the initiative items, plans and plan\nitems linked to one goal (listInitiativeItems, listPlans or listPlanItems with goalId). Links are\nadded with linkGoalInitiatives, linkGoalPlans and linkGoalPlanItems and removed with their unlink twins.",
        "operationId": "listGoals",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Goals whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Goals whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Goals whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Goals whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Goals whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Goals whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Goals whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Goals whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the goal with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the goal with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the goals with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the goals with these ids."
            }
          },
          {
            "name": "CompanyId",
            "in": "query",
            "description": "Goals belonging to the company with this id (see listCompanies).",
            "schema": {
              "type": "integer",
              "description": "Goals belonging to the company with this id (see listCompanies).",
              "format": "int32"
            }
          },
          {
            "name": "CompanyIdIn",
            "in": "query",
            "description": "Goals belonging to any of the companies with these ids (see listCompanies).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Goals belonging to any of the companies with these ids (see listCompanies)."
            }
          },
          {
            "name": "StatusId",
            "in": "query",
            "description": "Goals with this status, a string GUID: 00000000-0000-0000-0000-000000000301 Planned, 00000000-0000-0000-0000-000000000302 On track, 00000000-0000-0000-0000-000000000303 At risk, 00000000-0000-0000-0000-000000000304 Done. Goals with no status cannot be filtered for in v1.",
            "schema": {
              "type": "string",
              "description": "Goals with this status, a string GUID: 00000000-0000-0000-0000-000000000301 Planned, 00000000-0000-0000-0000-000000000302 On track, 00000000-0000-0000-0000-000000000303 At risk, 00000000-0000-0000-0000-000000000304 Done. Goals with no status cannot be filtered for in v1."
            }
          },
          {
            "name": "StatusIdIn",
            "in": "query",
            "description": "Goals with any of these statuses (the same four string GUIDs as statusId).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Goals with any of these statuses (the same four string GUIDs as statusId)."
            }
          },
          {
            "name": "OwnerId",
            "in": "query",
            "description": "Goals owned by the user with this id (a string GUID; see listUsers).",
            "schema": {
              "type": "string",
              "description": "Goals owned by the user with this id (a string GUID; see listUsers)."
            }
          },
          {
            "name": "OwnerIdIn",
            "in": "query",
            "description": "Goals owned by any of the users with these ids (string GUIDs; see listUsers).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Goals owned by any of the users with these ids (string GUIDs; see listUsers)."
            }
          },
          {
            "name": "TemplateId",
            "in": "query",
            "description": "Goals created from or last applied with the goal template with this id (see listGoalTemplates).",
            "schema": {
              "type": "integer",
              "description": "Goals created from or last applied with the goal template with this id (see listGoalTemplates).",
              "format": "int32"
            }
          },
          {
            "name": "TemplateIdIn",
            "in": "query",
            "description": "Goals whose goal template is any of these ids (see listGoalTemplates).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Goals whose goal template is any of these ids (see listGoalTemplates)."
            }
          },
          {
            "name": "StartDateAfter",
            "in": "query",
            "description": "Goals whose start date is on or after this date. Goals with no start date are not matched.",
            "schema": {
              "type": "string",
              "description": "Goals whose start date is on or after this date. Goals with no start date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "StartDateBefore",
            "in": "query",
            "description": "Goals whose start date is on or before this date. Goals with no start date are not matched.",
            "schema": {
              "type": "string",
              "description": "Goals whose start date is on or before this date. Goals with no start date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "TargetDateAfter",
            "in": "query",
            "description": "Goals whose target date is on or after this date. Goals with no target date are not matched.",
            "schema": {
              "type": "string",
              "description": "Goals whose target date is on or after this date. Goals with no target date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "TargetDateBefore",
            "in": "query",
            "description": "Goals whose target date is on or before this date. Goals with no target date are not matched.",
            "schema": {
              "type": "string",
              "description": "Goals whose target date is on or before this date. Goals with no target date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedAtAfter",
            "in": "query",
            "description": "Goals created on or after this instant (UTC).",
            "schema": {
              "type": "string",
              "description": "Goals created on or after this instant (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedAtBefore",
            "in": "query",
            "description": "Goals created on or before this instant (UTC).",
            "schema": {
              "type": "string",
              "description": "Goals created on or before this instant (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedAtAfter",
            "in": "query",
            "description": "Goals last updated on or after this instant (UTC). A never-edited goal has no updatedAt and is never matched: use createdAtAfter as well to catch new goals.",
            "schema": {
              "type": "string",
              "description": "Goals last updated on or after this instant (UTC). A never-edited goal has no updatedAt and is never matched: use createdAtAfter as well to catch new goals.",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedAtBefore",
            "in": "query",
            "description": "Goals last updated on or before this instant (UTC). Never-edited goals (updatedAt null) are not matched.",
            "schema": {
              "type": "string",
              "description": "Goals last updated on or before this instant (UTC). Never-edited goals (updatedAt null) are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for goals. Allowed values: SortOrder (the default: by company id, then the\ncompany's own manual order, so a company's goals stay together), Name, TargetDate, CreatedAt, UpdatedAt.",
            "schema": {
              "enum": [
                "sortOrder",
                "name",
                "targetDate",
                "createdAt",
                "updatedAt"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for goals. Allowed values: SortOrder (the default: by company id, then the\ncompany's own manual order, so a company's goals stay together), Name, TargetDate, CreatedAt, UpdatedAt."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "company",
                  "status",
                  "progress",
                  "isTrackProgress",
                  "startDate",
                  "targetDate",
                  "owner",
                  "description",
                  "icon",
                  "color",
                  "template",
                  "sortOrder",
                  "createdAt",
                  "updatedAt",
                  "relationships"
                ],
                "type": "string",
                "description": "Selectable response fields of a goal (used by the fields query parameter). Allowed values: Id, Name,\nCompany, Status, Progress, IsTrackProgress, StartDate, TargetDate, Owner, Description, Icon, Color,\nTemplate, SortOrder, CreatedAt, UpdatedAt, Relationships."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Goals"
        ],
        "summary": "Creates one goal per company in companiesIds, all or nothing, and returns them in the Full shape\n(without relationships), in companiesIds order, as one page, each at the end of its company's order.\ncompaniesIds holds 1-100 distinct companies you can see: an unknown, foreign or not granted company, a\ncompany whose status hides companies or a repeated id is validationFailed and nothing is created. The\noptional fields are validated and stored as patchGoal stores them; with templateId (listGoalTemplates)\na blank name and null description/icon/color come from the template; another client's or an unknown\ntemplate is notFound; needs Goals_Templates Read. An Idempotency-Key covers the whole set.\nWhen to use: to start goals for one or several companies, with any field set up front.\nNext: returns the goalIds patchGoal takes.\nNot here: applying a template to an existing goal (application only), and the goal's relationships:\nread them with getGoal.",
        "description": "Creates one goal per company in companiesIds, all or nothing, and returns them in the Full shape\n(without relationships), in companiesIds order, as one page, each at the end of its company's order.\ncompaniesIds holds 1-100 distinct companies you can see: an unknown, foreign or not granted company, a\ncompany whose status hides companies or a repeated id is validationFailed and nothing is created. The\noptional fields are validated and stored as patchGoal stores them; with templateId (listGoalTemplates)\na blank name and null description/icon/color come from the template; another client's or an unknown\ntemplate is notFound; needs Goals_Templates Read. An Idempotency-Key covers the whole set.\nWhen to use: to start goals for one or several companies, with any field set up front.\nNext: returns the goalIds patchGoal takes.\nNot here: applying a template to an existing goal (application only), and the goal's relationships:\nread them with getGoal.",
        "operationId": "createGoal",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoalCreateResource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goalId}": {
      "get": {
        "tags": [
          "Goals"
        ],
        "summary": "Returns one goal of the caller's client by id, always in the Full shape. A goal of another client,\none in a company the caller cannot see and an id that matches nothing are all reported as notFound.\nWhen to use: on a goalId from listGoals or createGoal.\nNext: patchGoal takes the same goalId.\nNot here: the linked records in full (listInitiativeItems, listPlans or listPlanItems with goalId),\nand adding or removing a link (linkGoalInitiatives, linkGoalPlans, linkGoalPlanItems and their unlink\ntwins).",
        "description": "Returns one goal of the caller's client by id, always in the Full shape. A goal of another client,\none in a company the caller cannot see and an id that matches nothing are all reported as notFound.\nWhen to use: on a goalId from listGoals or createGoal.\nNext: patchGoal takes the same goalId.\nNot here: the linked records in full (listInitiativeItems, listPlans or listPlanItems with goalId),\nand adding or removing a link (linkGoalInitiatives, linkGoalPlans, linkGoalPlanItems and their unlink\ntwins).",
        "operationId": "getGoal",
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "description": "Goal id (see listGoals).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Goals"
        ],
        "summary": "Patches one goal of your client, returned in the Full shape. Writable paths: /name, /description,\n/icon, /color, /statusId, /progress, /isTrackProgress, /startDate, /targetDate and /ownerId. Any\nother path, such as /companyId, /templateId, /sortOrder or /id, is validationFailed and nothing is\nwritten, not even the valid operations. A remove or null on /statusId or /ownerId clears it. Values\nare stored as sent: setting the Done status does not set progress to 100, and progress does not move\nthe status. A goal of another client, or in a company you cannot see, is notFound.\nWhen to use: on a goalId from listGoals or createGoal, to set any field after the create.\nNext: getGoal or listGoals re-reads the goal.\nNot here: moving a goal to another company (a goal's company never changes); reordering, which is\nupdateGoalSortOrder; and the goal's relationships: getGoal reads them, linkGoalInitiatives,\nlinkGoalPlans, linkGoalPlanItems and their unlink twins write them.",
        "description": "Patches one goal of your client, returned in the Full shape. Writable paths: /name, /description,\n/icon, /color, /statusId, /progress, /isTrackProgress, /startDate, /targetDate and /ownerId. Any\nother path, such as /companyId, /templateId, /sortOrder or /id, is validationFailed and nothing is\nwritten, not even the valid operations. A remove or null on /statusId or /ownerId clears it. Values\nare stored as sent: setting the Done status does not set progress to 100, and progress does not move\nthe status. A goal of another client, or in a company you cannot see, is notFound.\nWhen to use: on a goalId from listGoals or createGoal, to set any field after the create.\nNext: getGoal or listGoals re-reads the goal.\nNot here: moving a goal to another company (a goal's company never changes); reordering, which is\nupdateGoalSortOrder; and the goal's relationships: getGoal reads them, linkGoalInitiatives,\nlinkGoalPlans, linkGoalPlanItems and their unlink twins write them.",
        "operationId": "patchGoal",
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "description": "Goal id (see listGoals).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goalId}/sort-order": {
      "put": {
        "tags": [
          "Goals"
        ],
        "summary": "Moves one goal inside its company's manual order and returns it in the Full shape (without\nrelationships). afterGoalId is the goal the moved goal lands DIRECTLY after; null, 0 or an omitted\nproperty all mean the FIRST position, and anchoring a goal on itself is a no-op that returns it\nunchanged. There is no absolute index here. The order is one sequence PER COMPANY, so the anchor must\nbe a goal of the same company: a goal of another company you can see is validationFailed. Either id\nyou cannot reach — the goal or the anchor — is reported as notFound and nothing is moved.\nWhen to use: on goalIds from listGoals, read in sortBy=SortOrder order.\nNext: listGoals with sortBy=SortOrder re-reads the order.\nNot here: /sortOrder stays refused by patchGoal — this is the only way to reorder goals — and moving a\ngoal to another company.",
        "description": "Moves one goal inside its company's manual order and returns it in the Full shape (without\nrelationships). afterGoalId is the goal the moved goal lands DIRECTLY after; null, 0 or an omitted\nproperty all mean the FIRST position, and anchoring a goal on itself is a no-op that returns it\nunchanged. There is no absolute index here. The order is one sequence PER COMPANY, so the anchor must\nbe a goal of the same company: a goal of another company you can see is validationFailed. Either id\nyou cannot reach — the goal or the anchor — is reported as notFound and nothing is moved.\nWhen to use: on goalIds from listGoals, read in sortBy=SortOrder order.\nNext: listGoals with sortBy=SortOrder re-reads the order.\nNot here: /sortOrder stays refused by patchGoal — this is the only way to reorder goals — and moving a\ngoal to another company.",
        "operationId": "updateGoalSortOrder",
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "description": "Goal id (see listGoals).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoalSortOrderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goalId}/relationships/initiatives": {
      "post": {
        "tags": [
          "Goals"
        ],
        "summary": "Links initiative items to one goal; returns the goal's relationships after the write and one errors entry\nper id not linked. initiativeItemIds come from listInitiativeItems: 1-100 per call, items of the goal's\ncompany. An existing pair is a no-op, not an error; a repeated id counts once. An unknown id, another\nclient's or company's item, or one you cannot see is notFound in errors while the other ids are linked: 200\neven when every id failed. One transaction: a goal busy with another link write is validationFailed,\nnothing written; retry. An empty, longer or non-positive list is validationFailed, nothing written; an\nunreachable goal is notFound.\nWhen to use: on a goalId from listGoals or createGoal, to connect the goal to its initiatives.\nNext: getGoal re-reads the block; listInitiativeItems with goalId lists the items.\nNot here: removing a link (unlinkGoalInitiatives); plans and plan rows (linkGoalPlans, linkGoalPlanItems).",
        "description": "Links initiative items to one goal; returns the goal's relationships after the write and one errors entry\nper id not linked. initiativeItemIds come from listInitiativeItems: 1-100 per call, items of the goal's\ncompany. An existing pair is a no-op, not an error; a repeated id counts once. An unknown id, another\nclient's or company's item, or one you cannot see is notFound in errors while the other ids are linked: 200\neven when every id failed. One transaction: a goal busy with another link write is validationFailed,\nnothing written; retry. An empty, longer or non-positive list is validationFailed, nothing written; an\nunreachable goal is notFound.\nWhen to use: on a goalId from listGoals or createGoal, to connect the goal to its initiatives.\nNext: getGoal re-reads the block; listInitiativeItems with goalId lists the items.\nNot here: removing a link (unlinkGoalInitiatives); plans and plan rows (linkGoalPlans, linkGoalPlanItems).",
        "operationId": "linkGoalInitiatives",
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "description": "Goal id (see listGoals).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoalInitiativesLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goalId}/relationships/initiatives/unlink": {
      "post": {
        "tags": [
          "Goals"
        ],
        "summary": "Unlinks initiative items from one goal; returns the goal's relationships after the write and one errors\nentry per id not unlinked. initiativeItemIds come from listInitiativeItems or getGoal's\nrelationships.initiatives: 1-100 per call; a repeated id counts once. Unlike a link, where an existing pair\nis a no-op, a pair that is not linked, or whose item you cannot see, is notFound in errors while the other\nids are unlinked: 200 even when every id failed. Only the link goes; the item stays. One transaction: a goal\nbusy with another link write is validationFailed, nothing written; retry. An empty, longer or non-positive\nlist is validationFailed, nothing written; an unreachable goal is notFound.\nWhen to use: on a goalId from listGoals, to disconnect initiatives from the goal.\nNext: getGoal re-reads the block.\nNot here: adding a link (linkGoalInitiatives); deleting the item (deleteInitiativeItem).",
        "description": "Unlinks initiative items from one goal; returns the goal's relationships after the write and one errors\nentry per id not unlinked. initiativeItemIds come from listInitiativeItems or getGoal's\nrelationships.initiatives: 1-100 per call; a repeated id counts once. Unlike a link, where an existing pair\nis a no-op, a pair that is not linked, or whose item you cannot see, is notFound in errors while the other\nids are unlinked: 200 even when every id failed. Only the link goes; the item stays. One transaction: a goal\nbusy with another link write is validationFailed, nothing written; retry. An empty, longer or non-positive\nlist is validationFailed, nothing written; an unreachable goal is notFound.\nWhen to use: on a goalId from listGoals, to disconnect initiatives from the goal.\nNext: getGoal re-reads the block.\nNot here: adding a link (linkGoalInitiatives); deleting the item (deleteInitiativeItem).",
        "operationId": "unlinkGoalInitiatives",
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "description": "Goal id (see listGoals).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoalInitiativesLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goalId}/relationships/plans": {
      "post": {
        "tags": [
          "Goals"
        ],
        "summary": "Links whole plans to one goal; returns the goal's relationships after the write and one errors entry per id\nnot linked. planIds come from listPlans: 1-100 per call, Active or Completed plans of the goal's company. An\nexisting pair is a no-op, not an error; a repeated id counts once. Linking a plan drops the goal's direct\nlinks to its items. An unknown id, a trashed plan or one you cannot see is notFound in errors while the\nothers are linked: 200 even when every id failed. Written one plan at a time in id order: a busy plan\nanswers validationFailed after the earlier plans were written; re-read with getGoal and retry. An empty,\nlonger or non-positive list is validationFailed, nothing written; an unreachable goal is notFound.\nWhen to use: on a goalId from listGoals, to connect the goal to whole plans.\nNext: getGoal re-reads the block; listPlans with goalId lists the plans.\nNot here: removing a link (unlinkGoalPlans); single plan rows (linkGoalPlanItems).",
        "description": "Links whole plans to one goal; returns the goal's relationships after the write and one errors entry per id\nnot linked. planIds come from listPlans: 1-100 per call, Active or Completed plans of the goal's company. An\nexisting pair is a no-op, not an error; a repeated id counts once. Linking a plan drops the goal's direct\nlinks to its items. An unknown id, a trashed plan or one you cannot see is notFound in errors while the\nothers are linked: 200 even when every id failed. Written one plan at a time in id order: a busy plan\nanswers validationFailed after the earlier plans were written; re-read with getGoal and retry. An empty,\nlonger or non-positive list is validationFailed, nothing written; an unreachable goal is notFound.\nWhen to use: on a goalId from listGoals, to connect the goal to whole plans.\nNext: getGoal re-reads the block; listPlans with goalId lists the plans.\nNot here: removing a link (unlinkGoalPlans); single plan rows (linkGoalPlanItems).",
        "operationId": "linkGoalPlans",
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "description": "Goal id (see listGoals).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoalPlansLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goalId}/relationships/plans/unlink": {
      "post": {
        "tags": [
          "Goals"
        ],
        "summary": "Unlinks whole plans from one goal; returns the goal's relationships after the write and one errors entry per\nid not unlinked. planIds come from listPlans or getGoal's relationships.plans: 1-100 per call; a repeated id\ncounts once. Unlike a link, where an existing pair is a no-op, a plan that is not linked, or one you cannot\nsee, is notFound in errors while the others are unlinked: 200 even when every id failed. Only the link goes;\nthe plan stays. Written one plan at a time in id order: a busy plan answers validationFailed after the\nearlier plans were written; re-read with getGoal and retry. An empty, longer or non-positive list is\nvalidationFailed, nothing written; an unreachable goal is notFound.\nWhen to use: on a goalId from listGoals, to disconnect whole plans from the goal.\nNext: getGoal re-reads the block.\nNot here: adding a link (linkGoalPlans); deleting the plan (deletePlan).",
        "description": "Unlinks whole plans from one goal; returns the goal's relationships after the write and one errors entry per\nid not unlinked. planIds come from listPlans or getGoal's relationships.plans: 1-100 per call; a repeated id\ncounts once. Unlike a link, where an existing pair is a no-op, a plan that is not linked, or one you cannot\nsee, is notFound in errors while the others are unlinked: 200 even when every id failed. Only the link goes;\nthe plan stays. Written one plan at a time in id order: a busy plan answers validationFailed after the\nearlier plans were written; re-read with getGoal and retry. An empty, longer or non-positive list is\nvalidationFailed, nothing written; an unreachable goal is notFound.\nWhen to use: on a goalId from listGoals, to disconnect whole plans from the goal.\nNext: getGoal re-reads the block.\nNot here: adding a link (linkGoalPlans); deleting the plan (deletePlan).",
        "operationId": "unlinkGoalPlans",
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "description": "Goal id (see listGoals).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoalPlansLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goalId}/relationships/plan-items": {
      "post": {
        "tags": [
          "Goals"
        ],
        "summary": "Links plan items to one goal directly; returns the goal's relationships after the write and one errors entry\nper id not linked. planItemIds come from listPlanItems on a plan's first part (listPlanParts): 1-100 per\ncall. An existing pair is a no-op, not an error; a repeated id counts once. An item whose whole plan is\nlinked to the goal is validationFailed in errors; an unknown id, a row outside the first part or one you\ncannot see is notFound; the others are linked: 200 even when every id failed. Written one plan at a time in\nplan id order: a busy plan answers validationFailed after the earlier plans were written; re-read with\ngetGoal and retry. An empty, longer or non-positive list is validationFailed, nothing written; an\nunreachable goal is notFound.\nWhen to use: on a goalId from listGoals, to connect the goal to single plan rows.\nNext: getGoal re-reads the block.\nNot here: removing a link (unlinkGoalPlanItems); a whole plan (linkGoalPlans).",
        "description": "Links plan items to one goal directly; returns the goal's relationships after the write and one errors entry\nper id not linked. planItemIds come from listPlanItems on a plan's first part (listPlanParts): 1-100 per\ncall. An existing pair is a no-op, not an error; a repeated id counts once. An item whose whole plan is\nlinked to the goal is validationFailed in errors; an unknown id, a row outside the first part or one you\ncannot see is notFound; the others are linked: 200 even when every id failed. Written one plan at a time in\nplan id order: a busy plan answers validationFailed after the earlier plans were written; re-read with\ngetGoal and retry. An empty, longer or non-positive list is validationFailed, nothing written; an\nunreachable goal is notFound.\nWhen to use: on a goalId from listGoals, to connect the goal to single plan rows.\nNext: getGoal re-reads the block.\nNot here: removing a link (unlinkGoalPlanItems); a whole plan (linkGoalPlans).",
        "operationId": "linkGoalPlanItems",
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "description": "Goal id (see listGoals).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoalPlanItemsLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{goalId}/relationships/plan-items/unlink": {
      "post": {
        "tags": [
          "Goals"
        ],
        "summary": "Unlinks plan items from one goal; returns the goal's relationships after the write and one errors entry per\nid not unlinked. planItemIds come from listPlanItems or getGoal's relationships.planItems: 1-100 per call; a\nrepeated id counts once. Unlike a link, where an existing pair is a no-op, a pair not linked directly, or\nwhose row you cannot see, is notFound in errors while the others are unlinked: 200 even when every id\nfailed. Only the direct link goes; a row covered by its linked plan stays covered. Written one plan at a\ntime in plan id order: a busy plan answers validationFailed after the earlier plans were written; re-read\nwith getGoal and retry. An empty, longer or non-positive list is validationFailed, nothing written; an\nunreachable goal is notFound.\nWhen to use: on a goalId from listGoals, to disconnect single plan rows from the goal.\nNext: getGoal re-reads the block.\nNot here: adding a link (linkGoalPlanItems); a whole plan (unlinkGoalPlans).",
        "description": "Unlinks plan items from one goal; returns the goal's relationships after the write and one errors entry per\nid not unlinked. planItemIds come from listPlanItems or getGoal's relationships.planItems: 1-100 per call; a\nrepeated id counts once. Unlike a link, where an existing pair is a no-op, a pair not linked directly, or\nwhose row you cannot see, is notFound in errors while the others are unlinked: 200 even when every id\nfailed. Only the direct link goes; a row covered by its linked plan stays covered. Written one plan at a\ntime in plan id order: a busy plan answers validationFailed after the earlier plans were written; re-read\nwith getGoal and retry. An empty, longer or non-positive list is validationFailed, nothing written; an\nunreachable goal is notFound.\nWhen to use: on a goalId from listGoals, to disconnect single plan rows from the goal.\nNext: getGoal re-reads the block.\nNot here: adding a link (linkGoalPlanItems); a whole plan (unlinkGoalPlans).",
        "operationId": "unlinkGoalPlanItems",
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "description": "Goal id (see listGoals).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoalPlanItemsLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goalTemplates": {
      "get": {
        "tags": [
          "GoalTemplates"
        ],
        "summary": "Lists your client's goal templates, paged (25 by default, at most 100), with name, id and group filters\nand a sort. sortBy=SortOrder (default) is the application's order: the grouped templates first, by their\ngroup's order then their own, the ungrouped templates last. Each template carries its group as id + name.\nA template has one shape: there is no view or fields parameter.\nWhen to use: the producer of createGoal's templateId and listGoals?templateId; a goal created from a\ntemplate starts with its name, description, icon and colour.\nNext: getGoalTemplate for one template, createGoal with templateId.\nNot here: the goals made from a template (listGoals with templateId); creating or editing a template\n(createGoalTemplate, patchGoalTemplate); reordering templates or applying them to existing goals\n(application only); template groups as a list (each template carries its group).",
        "description": "Lists your client's goal templates, paged (25 by default, at most 100), with name, id and group filters\nand a sort. sortBy=SortOrder (default) is the application's order: the grouped templates first, by their\ngroup's order then their own, the ungrouped templates last. Each template carries its group as id + name.\nA template has one shape: there is no view or fields parameter.\nWhen to use: the producer of createGoal's templateId and listGoals?templateId; a goal created from a\ntemplate starts with its name, description, icon and colour.\nNext: getGoalTemplate for one template, createGoal with templateId.\nNot here: the goals made from a template (listGoals with templateId); creating or editing a template\n(createGoalTemplate, patchGoalTemplate); reordering templates or applying them to existing goals\n(application only); template groups as a list (each template carries its group).",
        "operationId": "listGoalTemplates",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Templates whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Templates whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Templates whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Templates whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Templates whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Templates whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Templates whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Templates whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the template with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the template with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the templates with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the templates with these ids."
            }
          },
          {
            "name": "GroupId",
            "in": "query",
            "description": "Templates in the template group with this id (read it off a template's group object).",
            "schema": {
              "type": "integer",
              "description": "Templates in the template group with this id (read it off a template's group object).",
              "format": "int32"
            }
          },
          {
            "name": "GroupIdIn",
            "in": "query",
            "description": "Templates in any of the template groups with these ids (read off the templates' group objects).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Templates in any of the template groups with these ids (read off the templates' group objects)."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for goal templates. Allowed values: SortOrder (the default: the grouped\ntemplates first, by their group's order then their own, the ungrouped templates last), Name, CreatedAt,\nUpdatedAt.",
            "schema": {
              "enum": [
                "sortOrder",
                "name",
                "createdAt",
                "updatedAt"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for goal templates. Allowed values: SortOrder (the default: the grouped\ntemplates first, by their group's order then their own, the ungrouped templates last), Name, CreatedAt,\nUpdatedAt."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalTemplateResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "GoalTemplates"
        ],
        "summary": "Creates one goal template in your client's library and returns it as getGoalTemplate reads it, at the end\nof its group, or of the ungrouped templates. name is required and trimmed; a name another template of your\nclient holds, compared case-insensitively, is validationFailed. groupId is optional: null, 0 or omitted\ncreates an ungrouped template, and a group of another client or an id that matches no group is notFound.\nA refused create writes nothing.\nWhen to use: to add a template that createGoal can start goals from.\nNext: createGoal with the returned id as templateId; patchGoalTemplate to change it.\nNot here: reordering templates, and creating or renaming template groups (application only).",
        "description": "Creates one goal template in your client's library and returns it as getGoalTemplate reads it, at the end\nof its group, or of the ungrouped templates. name is required and trimmed; a name another template of your\nclient holds, compared case-insensitively, is validationFailed. groupId is optional: null, 0 or omitted\ncreates an ungrouped template, and a group of another client or an id that matches no group is notFound.\nA refused create writes nothing.\nWhen to use: to add a template that createGoal can start goals from.\nNext: createGoal with the returned id as templateId; patchGoalTemplate to change it.\nNot here: reordering templates, and creating or renaming template groups (application only).",
        "operationId": "createGoalTemplate",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoalTemplateCreateResource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalTemplateResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goalTemplates/{templateId}": {
      "get": {
        "tags": [
          "GoalTemplates"
        ],
        "summary": "Returns one goal template of your client by id. A template of another client and an id that matches\nnothing are both reported as notFound.\nWhen to use: on a templateId from listGoalTemplates or off a goal's template object.\nNext: createGoal with this templateId.\nNot here: the goals made from this template (listGoals with templateId); editing the template\n(patchGoalTemplate); reordering it or applying it to an existing goal (application only).",
        "description": "Returns one goal template of your client by id. A template of another client and an id that matches\nnothing are both reported as notFound.\nWhen to use: on a templateId from listGoalTemplates or off a goal's template object.\nNext: createGoal with this templateId.\nNot here: the goals made from this template (listGoals with templateId); editing the template\n(patchGoalTemplate); reordering it or applying it to an existing goal (application only).",
        "operationId": "getGoalTemplate",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Goal template id (see listGoalTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalTemplateResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "GoalTemplates"
        ],
        "summary": "Patches one goal template of your client and returns it as getGoalTemplate reads it. Writable paths: /name,\n/description, /icon, /color and /groupId. Any other path, such as /sortOrder, /group or /id, and the move and\ncopy operations are validationFailed and nothing is written, not even the valid operations. /name may not be\nblank, removed or null, and a name another template holds is validationFailed; a remove or null clears\n/description, /icon and /color. A changed /groupId moves the template to the end of that group; a remove,\nnull or 0 on it ungroups the template. A template or group of another client, or an id that matches nothing, is\nnotFound.\nWhen to use: on a templateId from listGoalTemplates or createGoalTemplate, to rename, restyle or regroup it.\nNext: getGoalTemplate or listGoalTemplates re-reads it.\nNot here: reordering inside a group, and applying the template to existing goals (application only).",
        "description": "Patches one goal template of your client and returns it as getGoalTemplate reads it. Writable paths: /name,\n/description, /icon, /color and /groupId. Any other path, such as /sortOrder, /group or /id, and the move and\ncopy operations are validationFailed and nothing is written, not even the valid operations. /name may not be\nblank, removed or null, and a name another template holds is validationFailed; a remove or null clears\n/description, /icon and /color. A changed /groupId moves the template to the end of that group; a remove,\nnull or 0 on it ungroups the template. A template or group of another client, or an id that matches nothing, is\nnotFound.\nWhen to use: on a templateId from listGoalTemplates or createGoalTemplate, to rename, restyle or regroup it.\nNext: getGoalTemplate or listGoalTemplates re-reads it.\nNot here: reordering inside a group, and applying the template to existing goals (application only).",
        "operationId": "patchGoalTemplate",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Goal template id (see listGoalTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalTemplateResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates": {
      "get": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Lists the assessment templates of the caller's client.\nNext: getGroupTemplate for one template; listGroupTemplateParts for its sections and\nlistGroupTemplateGrades for its grades, with listGroupTemplateGroups and listGroupTemplateItems for\nits assessment content. The templateId is also what createReport takes to build a report.",
        "description": "Lists the assessment templates of the caller's client.\nNext: getGroupTemplate for one template; listGroupTemplateParts for its sections and\nlistGroupTemplateGrades for its grades, with listGroupTemplateGroups and listGroupTemplateItems for\nits assessment content. The templateId is also what createReport takes to build a report.",
        "operationId": "listGroupTemplates",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Templates whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Templates whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Templates whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Templates whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Templates whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Templates whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Templates whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Templates whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the template with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the template with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the templates with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the templates with these ids."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for assessment templates (indexed/cheap columns only). Allowed\nvalues: Name, Id.",
            "schema": {
              "enum": [
                "name",
                "id"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for assessment templates (indexed/cheap columns only). Allowed\nvalues: Name, Id."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "description",
                  "isRecurring",
                  "primaryUserLabel"
                ],
                "type": "string",
                "description": "Selectable response fields of an assessment template (used by the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}": {
      "get": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Returns one assessment template by id.\nNext: listGroupTemplateParts for its sections, listGroupTemplateGrades for its grades, and\nlistGroupTemplateGroups with listGroupTemplateItems for its assessment content.",
        "description": "Returns one assessment template by id.\nNext: listGroupTemplateParts for its sections, listGroupTemplateGrades for its grades, and\nlistGroupTemplateGroups with listGroupTemplateItems for its assessment content.",
        "operationId": "getGroupTemplate",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/parts": {
      "get": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Lists the parts (sections) of an assessment template, ordered by their position. Each part's\ntypeEnum uses the same values as a report part's typeEnum (executiveSummary, assessment,\nfiLegend, ...), so report parts map onto their template parts by that field.\nNext: returns the partId taken by getGroupTemplateTextPart, patchGroupTemplateTextPart,\ngetGroupTemplateSummaryAndNote, patchGroupTemplateExecutiveSummary and patchGroupTemplateNote.\nNot here: the sections of a report built from the template — listReportParts reads those.",
        "description": "Lists the parts (sections) of an assessment template, ordered by their position. Each part's\ntypeEnum uses the same values as a report part's typeEnum (executiveSummary, assessment,\nfiLegend, ...), so report parts map onto their template parts by that field.\nNext: returns the partId taken by getGroupTemplateTextPart, patchGroupTemplateTextPart,\ngetGroupTemplateSummaryAndNote, patchGroupTemplateExecutiveSummary and patchGroupTemplateNote.\nNot here: the sections of a report built from the template — listReportParts reads those.",
        "operationId": "listGroupTemplateParts",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplatePartResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/parts/{partId}/textPart": {
      "get": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Returns the text part of a template — its metadata and the include-note flag, not the summary or\nnote content.\nWhen to use: the partId comes from listGroupTemplateParts. Pick this for the part's own fields and\nthe flag; getGroupTemplateSummaryAndNote returns the summary and note text.\nNext: patchGroupTemplateTextPart writes the fields returned here.",
        "description": "Returns the text part of a template — its metadata and the include-note flag, not the summary or\nnote content.\nWhen to use: the partId comes from listGroupTemplateParts. Pick this for the part's own fields and\nthe flag; getGroupTemplateSummaryAndNote returns the summary and note text.\nNext: patchGroupTemplateTextPart writes the fields returned here.",
        "operationId": "getGroupTemplateTextPart",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateTextPartResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Applies a JSON Patch to the text part of a template (camelCase paths, e.g. /name, /includeNote)\nand returns the updated resource. A path outside the patchable set is rejected with 400.\nWhen to use: the partId comes from listGroupTemplateParts.\nNot here: the summary and note text — patchGroupTemplateExecutiveSummary and patchGroupTemplateNote\nwrite those; /includeNote here only controls whether the note is shown.",
        "description": "Applies a JSON Patch to the text part of a template (camelCase paths, e.g. /name, /includeNote)\nand returns the updated resource. A path outside the patchable set is rejected with 400.\nWhen to use: the partId comes from listGroupTemplateParts.\nNot here: the summary and note text — patchGroupTemplateExecutiveSummary and patchGroupTemplateNote\nwrite those; /includeNote here only controls whether the note is shown.",
        "operationId": "patchGroupTemplateTextPart",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateTextPartResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/parts/{partId}/summaryAndNote": {
      "get": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Returns the executive summary and note content of one template part, the part's own id, name and\ntype, and whether the note is included (sourced from the text part's include-note flag). Same\nresponse shape as getReportPartSummaryAndNote on the report side.\nWhen to use: the partId comes from listGroupTemplateParts. This is the content pair;\ngetGroupTemplateTextPart returns the part metadata and the flag without either string.\nNext: patchGroupTemplateExecutiveSummary and patchGroupTemplateNote write the two strings back.",
        "description": "Returns the executive summary and note content of one template part, the part's own id, name and\ntype, and whether the note is included (sourced from the text part's include-note flag). Same\nresponse shape as getReportPartSummaryAndNote on the report side.\nWhen to use: the partId comes from listGroupTemplateParts. This is the content pair;\ngetGroupTemplateTextPart returns the part metadata and the flag without either string.\nNext: patchGroupTemplateExecutiveSummary and patchGroupTemplateNote write the two strings back.",
        "operationId": "getGroupTemplateSummaryAndNote",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateSummaryNoteResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/parts/{partId}/executiveSummary": {
      "patch": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Replaces the executive summary HTML of one template part and returns the updated resource.\nContent past the maximum allowed length is rejected with 400.\nWhen to use: the partId comes from listGroupTemplateParts.\nNot here: the note — patchGroupTemplateNote; whether the note is shown — patchGroupTemplateTextPart\n/includeNote; the summary of a report already built from this template —\npatchReportPartExecutiveSummary, since editing a template does not change an existing report.",
        "description": "Replaces the executive summary HTML of one template part and returns the updated resource.\nContent past the maximum allowed length is rejected with 400.\nWhen to use: the partId comes from listGroupTemplateParts.\nNot here: the note — patchGroupTemplateNote; whether the note is shown — patchGroupTemplateTextPart\n/includeNote; the summary of a report already built from this template —\npatchReportPartExecutiveSummary, since editing a template does not change an existing report.",
        "operationId": "patchGroupTemplateExecutiveSummary",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupTemplateExecutiveSummaryUpdateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateSummaryNoteResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/parts/{partId}/note": {
      "patch": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Replaces the note HTML of one template part and returns the updated resource. Content past the\nmaximum allowed length is rejected with 400.\nWhen to use: the partId comes from listGroupTemplateParts.\nNot here: the executive summary — patchGroupTemplateExecutiveSummary; whether this note is shown —\npatchGroupTemplateTextPart /includeNote; the note of a report already built from this template —\npatchReportPartNote, since editing a template does not change an existing report.",
        "description": "Replaces the note HTML of one template part and returns the updated resource. Content past the\nmaximum allowed length is rejected with 400.\nWhen to use: the partId comes from listGroupTemplateParts.\nNot here: the executive summary — patchGroupTemplateExecutiveSummary; whether this note is shown —\npatchGroupTemplateTextPart /includeNote; the note of a report already built from this template —\npatchReportPartNote, since editing a template does not change an existing report.",
        "operationId": "patchGroupTemplateNote",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupTemplateNoteUpdateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateSummaryNoteResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/grades": {
      "get": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Lists the grades of an assessment template, with their health flags, colour, icon and legend.\nOptionally narrowed to one or more of the template's grade columns.\nNext: returns the gradeId taken by patchGroupTemplateGrade, and each row carries the columnId that\ncreateGroupTemplateGrade needs — nothing else lists a template's grade columns.\nNot here: the grades of one report — listReportAssessmentGrades pages them; the module-level\ntechnology grades — listTechnologyGrades.",
        "description": "Lists the grades of an assessment template, with their health flags, colour, icon and legend.\nOptionally narrowed to one or more of the template's grade columns.\nNext: returns the gradeId taken by patchGroupTemplateGrade, and each row carries the columnId that\ncreateGroupTemplateGrade needs — nothing else lists a template's grade columns.\nNot here: the grades of one report — listReportAssessmentGrades pages them; the module-level\ntechnology grades — listTechnologyGrades.",
        "operationId": "listGroupTemplateGrades",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ColumnId",
            "in": "query",
            "description": "Return only the grades on the template column with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the grades on the template column with this id.",
              "format": "int32"
            }
          },
          {
            "name": "ColumnIdIn",
            "in": "query",
            "description": "Return only the grades on the template columns with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the grades on the template columns with these ids."
            }
          },
          {
            "name": "IsHealth",
            "in": "query",
            "description": "Return only grades whose isHealth flag equals this value.",
            "schema": {
              "type": "boolean",
              "description": "Return only grades whose isHealth flag equals this value."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateGradeResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Creates a grade on a template column and returns it. The body's columnId must belong to the\ntemplate in the route; otherwise the request is reported as not found.\nWhen to use: the columnId is read off a listGroupTemplateGrades row, or off columns[].columnId on a\nlistGroupTemplateItems view=Full row — no operation lists a template's grade columns, so a template\nwith no grades yet has no grade column that can be discovered through this API.\nNext: patchGroupTemplateGrade edits the grade afterwards; columnId itself is not patchable.",
        "description": "Creates a grade on a template column and returns it. The body's columnId must belong to the\ntemplate in the route; otherwise the request is reported as not found.\nWhen to use: the columnId is read off a listGroupTemplateGrades row, or off columns[].columnId on a\nlistGroupTemplateItems view=Full row — no operation lists a template's grade columns, so a template\nwith no grades yet has no grade column that can be discovered through this API.\nNext: patchGroupTemplateGrade edits the grade afterwards; columnId itself is not patchable.",
        "operationId": "createGroupTemplateGrade",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupTemplateGradeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateGradeResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/grades/{gradeId}": {
      "patch": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Applies a JSON Patch to one grade of an assessment template (camelCase paths, e.g. /name,\n/isDefault) and returns the updated resource. The grade must belong to the template in the\nroute; columnId is not patchable.\nWhen to use: the gradeId comes from listGroupTemplateGrades. To put a grade on another column,\ncreate one there with createGroupTemplateGrade.\nNot here: the grade an item carries in one report — patchReportAssessmentItem /templateGradeId,\nchosen from listReportAssessmentGrades; editing a template does not change an existing report.",
        "description": "Applies a JSON Patch to one grade of an assessment template (camelCase paths, e.g. /name,\n/isDefault) and returns the updated resource. The grade must belong to the template in the\nroute; columnId is not patchable.\nWhen to use: the gradeId comes from listGroupTemplateGrades. To put a grade on another column,\ncreate one there with createGroupTemplateGrade.\nNot here: the grade an item carries in one report — patchReportAssessmentItem /templateGradeId,\nchosen from listReportAssessmentGrades; editing a template does not change an existing report.",
        "operationId": "patchGroupTemplateGrade",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "gradeId",
            "in": "path",
            "description": "Grade id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateGradeResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/groups": {
      "get": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Lists the groups (categories) of an assessment template, ordered by their position. The rows\ncarry no items — read those with listGroupTemplateItems filtered by groupId; each row's\nitemsCount tells you how many to expect. Optionally narrowed by active state, name, market or\ntag.\nWhen to use: the market filter takes a marketId from listCompanyMarkets; a tag id can only be read\noff the tags[] of a group row, since no operation lists tags.\nNext: returns the groupId taken by patchGroupTemplateGroup, by createGroupTemplateItem and by the\ngroupId filter of listGroupTemplateItems.\nNot here: the same category as instantiated in one report — listReportAssessmentGroups pages those\ngroups; access territories — listCompanyGroups; flexible-items groups — listTechnologyGroups.",
        "description": "Lists the groups (categories) of an assessment template, ordered by their position. The rows\ncarry no items — read those with listGroupTemplateItems filtered by groupId; each row's\nitemsCount tells you how many to expect. Optionally narrowed by active state, name, market or\ntag.\nWhen to use: the market filter takes a marketId from listCompanyMarkets; a tag id can only be read\noff the tags[] of a group row, since no operation lists tags.\nNext: returns the groupId taken by patchGroupTemplateGroup, by createGroupTemplateItem and by the\ngroupId filter of listGroupTemplateItems.\nNot here: the same category as instantiated in one report — listReportAssessmentGroups pages those\ngroups; access territories — listCompanyGroups; flexible-items groups — listTechnologyGroups.",
        "operationId": "listGroupTemplateGroups",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IsActive",
            "in": "query",
            "description": "Return only active (true) or only inactive (false) groups.",
            "schema": {
              "type": "boolean",
              "description": "Return only active (true) or only inactive (false) groups."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Return only the group whose name equals this value (case-insensitive).",
            "schema": {
              "type": "string",
              "description": "Return only the group whose name equals this value (case-insensitive)."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Return only the groups whose name contains this value (case-insensitive).",
            "schema": {
              "type": "string",
              "description": "Return only the groups whose name contains this value (case-insensitive)."
            }
          },
          {
            "name": "MarketId",
            "in": "query",
            "description": "Return only the groups limited to the market with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the groups limited to the market with this id.",
              "format": "int32"
            }
          },
          {
            "name": "MarketIdIn",
            "in": "query",
            "description": "Return only the groups limited to any of the markets with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the groups limited to any of the markets with these ids."
            }
          },
          {
            "name": "TagId",
            "in": "query",
            "description": "Return only the groups tagged with the tag with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the groups tagged with the tag with this id.",
              "format": "int32"
            }
          },
          {
            "name": "TagIdIn",
            "in": "query",
            "description": "Return only the groups tagged with any of the tags with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the groups tagged with any of the tags with these ids."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateGroupResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Creates a group in an assessment template and returns it. The group is appended to the end of\nthe template; use patchGroupTemplateGroup to move it. Market ids must belong to the caller's\nclient and tags are given by NAME.\nWhen to use: the marketIds are the ids listCompanyMarkets returns — template markets and company\nmarkets are the same entity and the same id space.\nNext: createGroupTemplateItem fills the new group, and listGroupTemplateGroups shows it in position.\nNot here: a group in a report already built from this template — a new template group does not\nappear in existing reports.",
        "description": "Creates a group in an assessment template and returns it. The group is appended to the end of\nthe template; use patchGroupTemplateGroup to move it. Market ids must belong to the caller's\nclient and tags are given by NAME.\nWhen to use: the marketIds are the ids listCompanyMarkets returns — template markets and company\nmarkets are the same entity and the same id space.\nNext: createGroupTemplateItem fills the new group, and listGroupTemplateGroups shows it in position.\nNot here: a group in a report already built from this template — a new template group does not\nappear in existing reports.",
        "operationId": "createGroupTemplateGroup",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupTemplateGroupInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateGroupResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/groups/{groupId}": {
      "patch": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Applies a JSON Patch to one group of an assessment template (camelCase paths: /name,\n/description, /isActive, /sortOrder) and returns the updated resource. The group must belong to\nthe template in the route. Markets and tags are not patchable and are preserved.\nWhen to use: the groupId comes from listGroupTemplateGroups; /sortOrder is how a group is moved.\nNot here: the same group as instantiated in one report — listReportAssessmentGroups pages those\ngroups; editing a template does not change an existing report.",
        "description": "Applies a JSON Patch to one group of an assessment template (camelCase paths: /name,\n/description, /isActive, /sortOrder) and returns the updated resource. The group must belong to\nthe template in the route. Markets and tags are not patchable and are preserved.\nWhen to use: the groupId comes from listGroupTemplateGroups; /sortOrder is how a group is moved.\nNot here: the same group as instantiated in one report — listReportAssessmentGroups pages those\ngroups; editing a template does not change an existing report.",
        "operationId": "patchGroupTemplateGroup",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateGroupResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/items": {
      "get": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Lists the items of an assessment template, ordered by group then item position. view=Full\nreturns every field: the remaining text values (description, health standard, reference\ninstructions, reference link) plus every column value held as source rows, pick-list columns\nreturning all their options with the default flagged. fields=... replaces the preset rather\nthan adding to it (the listed fields plus id) and overrides view. Filter by groupId for one\ngroup's items.\nWhen to use: takes the templateId alone — no part or group id in the route, the flat shape\nlistReportAssessmentItems has on the report side.\nNext: returns the itemId patchGroupTemplateItem takes; under view=Full columns[].columnId is\nwhat createGroupTemplateGrade needs.\nNot here: the items of a report built from this template — listReportAssessmentItems reads\nthose as a filterable page linked by templateItemId; editing a template does not change an\nexisting report.",
        "description": "Lists the items of an assessment template, ordered by group then item position. view=Full\nreturns every field: the remaining text values (description, health standard, reference\ninstructions, reference link) plus every column value held as source rows, pick-list columns\nreturning all their options with the default flagged. fields=... replaces the preset rather\nthan adding to it (the listed fields plus id) and overrides view. Filter by groupId for one\ngroup's items.\nWhen to use: takes the templateId alone — no part or group id in the route, the flat shape\nlistReportAssessmentItems has on the report side.\nNext: returns the itemId patchGroupTemplateItem takes; under view=Full columns[].columnId is\nwhat createGroupTemplateGrade needs.\nNot here: the items of a report built from this template — listReportAssessmentItems reads\nthose as a filterable page linked by templateItemId; editing a template does not change an\nexisting report.",
        "operationId": "listGroupTemplateItems",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "GroupId",
            "in": "query",
            "description": "Return only the items of the template group with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the items of the template group with this id.",
              "format": "int32"
            }
          },
          {
            "name": "GroupIdIn",
            "in": "query",
            "description": "Return only the items of the template groups with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items of the template groups with these ids."
            }
          },
          {
            "name": "IsActive",
            "in": "query",
            "description": "Return only active (true) or only inactive (false) items.",
            "schema": {
              "type": "boolean",
              "description": "Return only active (true) or only inactive (false) items."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Return only the item whose name equals this value (case-insensitive).",
            "schema": {
              "type": "string",
              "description": "Return only the item whose name equals this value (case-insensitive)."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Return only the items whose name contains this value (case-insensitive).",
            "schema": {
              "type": "string",
              "description": "Return only the items whose name contains this value (case-insensitive)."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "description",
                  "healthStandard",
                  "referenceInstructions",
                  "referenceLink",
                  "weight",
                  "sortOrder",
                  "isActive",
                  "groupId",
                  "columns"
                ],
                "type": "string",
                "description": "Selectable response fields of a template item (used by the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateItemResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Creates an item in a group of an assessment template and returns it. The body's groupId must\nbelong to the template in the route. A text value the template carries no column for is rejected.\nWhen to use: the groupId comes from listGroupTemplateGroups.\nNext: patchGroupTemplateItem edits the item afterwards.\nNot here: an item in a report already built from this template — a new template item does not\nappear in existing reports.",
        "description": "Creates an item in a group of an assessment template and returns it. The body's groupId must\nbelong to the template in the route. A text value the template carries no column for is rejected.\nWhen to use: the groupId comes from listGroupTemplateGroups.\nNext: patchGroupTemplateItem edits the item afterwards.\nNot here: an item in a report already built from this template — a new template item does not\nappear in existing reports.",
        "operationId": "createGroupTemplateItem",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupTemplateItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/items/{itemId}": {
      "patch": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Applies a JSON Patch to one item of an assessment template (camelCase paths: /name,\n/description, /healthStandard, /referenceInstructions, /referenceLink, /weight, /sortOrder,\n/isActive) and returns the updated resource. The item must belong to the template in the route.\nThe item's other column values — grade, status, risk, solution, budgets, tags — are preserved.\nWhen to use: the itemId comes from listGroupTemplateItems.\nNot here: the same item as it stands in one report — getReportAssessmentItem reads that copy and\npatchReportAssessmentItem writes it; editing a template does not change an existing report.",
        "description": "Applies a JSON Patch to one item of an assessment template (camelCase paths: /name,\n/description, /healthStandard, /referenceInstructions, /referenceLink, /weight, /sortOrder,\n/isActive) and returns the updated resource. The item must belong to the template in the route.\nThe item's other column values — grade, status, risk, solution, budgets, tags — are preserved.\nWhen to use: the itemId comes from listGroupTemplateItems.\nNot here: the same item as it stands in one report — getReportAssessmentItem reads that copy and\npatchReportAssessmentItem writes it; editing a template does not change an existing report.",
        "operationId": "patchGroupTemplateItem",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/schedules": {
      "get": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Lists, for one template and one year, every company the caller can see with its schedule entry:\nthe primary user (the template labels them, e.g. \"vCIO\") and the planned reports per year.\nWhen to use: to see who is the vCIO for each company before changing it. A company with no entry\nyet is listed with primaryUser null and reportsPerYear 1, exactly as the Schedule screen shows it.\nyear defaults to the current year.\nNext: updateCompanySchedulePrimaryUser sets one company's primary user;\nupdateGroupTemplateSchedulePrimaryUser sets it for many companies at once.\nNot here: reports themselves (listReports) and the template's own fields (getGroupTemplate).",
        "description": "Lists, for one template and one year, every company the caller can see with its schedule entry:\nthe primary user (the template labels them, e.g. \"vCIO\") and the planned reports per year.\nWhen to use: to see who is the vCIO for each company before changing it. A company with no entry\nyet is listed with primaryUser null and reportsPerYear 1, exactly as the Schedule screen shows it.\nyear defaults to the current year.\nNext: updateCompanySchedulePrimaryUser sets one company's primary user;\nupdateGroupTemplateSchedulePrimaryUser sets it for many companies at once.\nNot here: reports themselves (listReports) and the template's own fields (getGroupTemplate).",
        "operationId": "listGroupTemplateSchedules",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Year",
            "in": "query",
            "description": "The schedule year to list. Defaults to the current year. Accepted range 2000 to 2100.",
            "schema": {
              "type": "integer",
              "description": "The schedule year to list. Defaults to the current year. Accepted range 2000 to 2100.",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateScheduleResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/GroupTemplates/{templateId}/schedules/primaryUser": {
      "put": {
        "tags": [
          "GroupTemplates"
        ],
        "summary": "Sets the primary user (e.g. the vCIO) of many companies for one template and year in one call, and\nreturns the updated entries plus a per-company error list.\nWhen to use: \"make Jesse the vCIO for every customer on this template\". companyIds is required\n(1 to 100 ids, taken from listGroupTemplateSchedules for the template and year); to cover a whole\nclient, send batches of up to 100. One unknown id fails the whole request with nothing written. A\ncompany the user cannot see is refused in errors and the others still update. Entries that do not\nexist yet are created. Send an Idempotency-Key so a retry replays the first response.\nNext: listGroupTemplateSchedules shows the result.\nNot here: clearing a primary user, and changing the template's label for it.",
        "description": "Sets the primary user (e.g. the vCIO) of many companies for one template and year in one call, and\nreturns the updated entries plus a per-company error list.\nWhen to use: \"make Jesse the vCIO for every customer on this template\". companyIds is required\n(1 to 100 ids, taken from listGroupTemplateSchedules for the template and year); to cover a whole\nclient, send batches of up to 100. One unknown id fails the whole request with nothing written. A\ncompany the user cannot see is refused in errors and the others still update. Entries that do not\nexist yet are created. Send an Idempotency-Key so a retry replays the first response.\nNext: listGroupTemplateSchedules shows the result.\nNot here: clearing a primary user, and changing the template's label for it.",
        "operationId": "updateGroupTemplateSchedulePrimaryUser",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Group template id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupTemplateSchedulePrimaryUserInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupTemplateScheduleBulkResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/items": {
      "get": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Lists your client's initiative items, with filters, sort, paging and field selection, scoped to\nthe companies you can see.\nWhen to use: Initiatives is one flat client-wide list — no group, part or report id. companyId\ncomes from listCompanies, assigneeId from listUsers (string GUID), tagId from listInitiativeTags,\nstatusId / priorityId from listInitiativeColumns options, goalId from listGoals; siteId is read\noff an item's site object.\ncreatedAtAfter/Before and updatedAtAfter/Before bound the audit stamps (inclusive, UTC) and\nsortBy=UpdatedAt orders by last change; a never-edited item has updatedAt null and matches NO\nupdatedAt bound, so poll with createdAtAfter too. A filter or sortBy on a hidden column is REFUSED\nwith validationFailed naming it.\nNext: returns the itemId getInitiativeItem and getInitiativeItemContent take.\nNot here: HTML content (getInitiativeItemContent); the same items through a report part —\nlistReportInitiativeItems, narrowed to its report's company.",
        "description": "Lists your client's initiative items, with filters, sort, paging and field selection, scoped to\nthe companies you can see.\nWhen to use: Initiatives is one flat client-wide list — no group, part or report id. companyId\ncomes from listCompanies, assigneeId from listUsers (string GUID), tagId from listInitiativeTags,\nstatusId / priorityId from listInitiativeColumns options, goalId from listGoals; siteId is read\noff an item's site object.\ncreatedAtAfter/Before and updatedAtAfter/Before bound the audit stamps (inclusive, UTC) and\nsortBy=UpdatedAt orders by last change; a never-edited item has updatedAt null and matches NO\nupdatedAt bound, so poll with createdAtAfter too. A filter or sortBy on a hidden column is REFUSED\nwith validationFailed naming it.\nNext: returns the itemId getInitiativeItem and getInitiativeItemContent take.\nNot here: HTML content (getInitiativeItemContent); the same items through a report part —\nlistReportInitiativeItems, narrowed to its report's company.",
        "operationId": "listInitiativeItems",
        "parameters": [
          {
            "name": "CompanyId",
            "in": "query",
            "description": "Items belonging to the company with this id (see listCompanies).",
            "schema": {
              "type": "integer",
              "description": "Items belonging to the company with this id (see listCompanies).",
              "format": "int32"
            }
          },
          {
            "name": "CompanyIdIn",
            "in": "query",
            "description": "Items belonging to any of the companies with these ids (see listCompanies).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items belonging to any of the companies with these ids (see listCompanies)."
            }
          },
          {
            "name": "TechnologyItemId",
            "in": "query",
            "description": "Items linked to the technology item with this id (the id listTechnologyItems returns). A technology item is linked to at most one initiative item.",
            "schema": {
              "type": "integer",
              "description": "Items linked to the technology item with this id (the id listTechnologyItems returns). A technology item is linked to at most one initiative item.",
              "format": "int32"
            }
          },
          {
            "name": "AssessmentItemId",
            "in": "query",
            "description": "Items linked to the assessment item (finding) with this id (the itemId listAssessmentItems returns). Only findings of draft reports you can read count.",
            "schema": {
              "type": "integer",
              "description": "Items linked to the assessment item (finding) with this id (the itemId listAssessmentItems returns). Only findings of draft reports you can read count.",
              "format": "int32"
            }
          },
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Items whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Items whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Items whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Items whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Items whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Items whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Items whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Items whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the item with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the item with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the items with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items with these ids."
            }
          },
          {
            "name": "Month",
            "in": "query",
            "description": "Items whose budget month is this value (1-12).",
            "schema": {
              "type": "integer",
              "description": "Items whose budget month is this value (1-12).",
              "format": "int32"
            }
          },
          {
            "name": "Year",
            "in": "query",
            "description": "Items whose budget year is this value.",
            "schema": {
              "type": "integer",
              "description": "Items whose budget year is this value.",
              "format": "int32"
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "description": "Items placed at the site with this id. Sites have no listing operation — read the id off an item's site object.",
            "schema": {
              "type": "integer",
              "description": "Items placed at the site with this id. Sites have no listing operation — read the id off an item's site object.",
              "format": "int32"
            }
          },
          {
            "name": "SiteIdIn",
            "in": "query",
            "description": "Items placed at any of the sites with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items placed at any of the sites with these ids."
            }
          },
          {
            "name": "AssigneeId",
            "in": "query",
            "description": "Items assigned to the user with this id (a string GUID; see listUsers).",
            "schema": {
              "type": "string",
              "description": "Items assigned to the user with this id (a string GUID; see listUsers)."
            }
          },
          {
            "name": "AssigneeIdIn",
            "in": "query",
            "description": "Items assigned to any of the users with these ids (string GUIDs; see listUsers).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Items assigned to any of the users with these ids (string GUIDs; see listUsers)."
            }
          },
          {
            "name": "TagId",
            "in": "query",
            "description": "Items carrying the tag with this id (see listInitiativeTags).",
            "schema": {
              "type": "integer",
              "description": "Items carrying the tag with this id (see listInitiativeTags).",
              "format": "int32"
            }
          },
          {
            "name": "TagIdIn",
            "in": "query",
            "description": "Items carrying any of the tags with these ids (see listInitiativeTags).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items carrying any of the tags with these ids (see listInitiativeTags)."
            }
          },
          {
            "name": "StatusId",
            "in": "query",
            "description": "Items with this status. A string GUID from the Status column's options (see listInitiativeColumns).",
            "schema": {
              "type": "string",
              "description": "Items with this status. A string GUID from the Status column's options (see listInitiativeColumns)."
            }
          },
          {
            "name": "StatusIdIn",
            "in": "query",
            "description": "Items with any of these statuses (string GUIDs from the Status column's options).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Items with any of these statuses (string GUIDs from the Status column's options)."
            }
          },
          {
            "name": "PriorityId",
            "in": "query",
            "description": "Items with this priority. A string GUID from the Priority column's options (see listInitiativeColumns).",
            "schema": {
              "type": "string",
              "description": "Items with this priority. A string GUID from the Priority column's options (see listInitiativeColumns)."
            }
          },
          {
            "name": "PriorityIdIn",
            "in": "query",
            "description": "Items with any of these priorities (string GUIDs from the Priority column's options).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Items with any of these priorities (string GUIDs from the Priority column's options)."
            }
          },
          {
            "name": "CreatedAtAfter",
            "in": "query",
            "description": "Items created on or after this instant (UTC).",
            "schema": {
              "type": "string",
              "description": "Items created on or after this instant (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedAtBefore",
            "in": "query",
            "description": "Items created on or before this instant (UTC).",
            "schema": {
              "type": "string",
              "description": "Items created on or before this instant (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedAtAfter",
            "in": "query",
            "description": "Items last updated on or after this instant (UTC). A never-modified item has no updatedAt and is never matched — use createdAtAfter as well to catch new items.",
            "schema": {
              "type": "string",
              "description": "Items last updated on or after this instant (UTC). A never-modified item has no updatedAt and is never matched — use createdAtAfter as well to catch new items.",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedAtBefore",
            "in": "query",
            "description": "Items last updated on or before this instant (UTC). Never-modified items (updatedAt null) are not matched.",
            "schema": {
              "type": "string",
              "description": "Items last updated on or before this instant (UTC). Never-modified items (updatedAt null) are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "GoalId",
            "in": "query",
            "description": "Items linked to the goal with this id (see listGoals). Only goals you can see count.",
            "schema": {
              "type": "integer",
              "description": "Items linked to the goal with this id (see listGoals). Only goals you can see count.",
              "format": "int32"
            }
          },
          {
            "name": "GoalIdIn",
            "in": "query",
            "description": "Items linked to any of the goals with these ids (see listGoals).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items linked to any of the goals with these ids (see listGoals)."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for initiative items. Allowed values: SortOrder (the module's own\nmanual order, the default), Name, CreatedAt, UpdatedAt.",
            "schema": {
              "enum": [
                "sortOrder",
                "name",
                "createdAt",
                "updatedAt"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for initiative items. Allowed values: SortOrder (the module's own\nmanual order, the default), Name, CreatedAt, UpdatedAt."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "sortOrder",
                  "company",
                  "status",
                  "priority",
                  "month",
                  "year",
                  "tags",
                  "summary",
                  "nextSteps",
                  "budgetEstimate",
                  "oneTimeBudget",
                  "itemsBudget",
                  "laborBudget",
                  "partsBudget",
                  "recurringBudget",
                  "recurringPeriod",
                  "recurringTotal",
                  "quantity",
                  "effectiveDate",
                  "cancellationDate",
                  "site",
                  "assignee",
                  "contentLength",
                  "columnValues",
                  "createdAt",
                  "updatedAt",
                  "goals",
                  "relationships"
                ],
                "type": "string",
                "description": "Selectable response fields of an initiative item (used by the fields query parameter). The item's\nHTML content is deliberately absent: it is served by its own operation, and only its length\n(ContentLength) is selectable here."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Creates one initiative item for your client and returns it in the Full shape. It lands at the\nEND of the manual order; updateInitiativeItemSortOrder moves it. statusId / priorityId are\noption GUIDs from listInitiativeColumns, not row ids; omitting either takes that column's\nisDefault. companyId must be a company you can see, siteId an ACTIVE site of it, and assigneeId\na user with access to it. In columnValues an unknown columnId and a hidden one answer the SAME\nnotFound, and a value the column's type cannot hold is validationFailed; nothing is created. An\nIdempotency-Key makes a retry safe (no second item).\nWhen to use: module scope, one item; HTML content goes through updateInitiativeItemContent\nafterwards, never in this body.\nNext: returns the itemId taken by patchInitiativeItem.\nNot here: the report-part twin createReportInitiativeItem, whose body carries no companyId.",
        "description": "Creates one initiative item for your client and returns it in the Full shape. It lands at the\nEND of the manual order; updateInitiativeItemSortOrder moves it. statusId / priorityId are\noption GUIDs from listInitiativeColumns, not row ids; omitting either takes that column's\nisDefault. companyId must be a company you can see, siteId an ACTIVE site of it, and assigneeId\na user with access to it. In columnValues an unknown columnId and a hidden one answer the SAME\nnotFound, and a value the column's type cannot hold is validationFailed; nothing is created. An\nIdempotency-Key makes a retry safe (no second item).\nWhen to use: module scope, one item; HTML content goes through updateInitiativeItemContent\nafterwards, never in this body.\nNext: returns the itemId taken by patchInitiativeItem.\nNot here: the report-part twin createReportInitiativeItem, whose body carries no companyId.",
        "operationId": "createInitiativeItem",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeItemCreateResource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Applies ONE JSON Patch to several initiative items, targeted by an explicit entityIds list,\nanswering a per-item envelope: items holds the resources that WERE patched and errors one per\nid that was not — notFound for an id you cannot reach, validationFailed for one the write\nrejected. Every id is in exactly one of the two. The wrapper is application/json; only the\nnested patch is RFC 6902. An empty entityIds list is REFUSED, never read as \"every item\", and\nat most 100 ids come per request. The document is validated first, so one unwritable path\nwrites nothing: the paths are patchInitiativeItem's, /sortOrder stays refused, and a hidden\ncolumn answers the same notFound, never a silent drop. A 200 is replayed, so retrying the\nfailures needs a FRESH Idempotency-Key.\nWhen to use: module scope, one patch over several itemIds from listInitiativeItems.\nNot here: one item (patchInitiativeItem answers the resource itself), and creating, deleting\nor reordering.",
        "description": "Applies ONE JSON Patch to several initiative items, targeted by an explicit entityIds list,\nanswering a per-item envelope: items holds the resources that WERE patched and errors one per\nid that was not — notFound for an id you cannot reach, validationFailed for one the write\nrejected. Every id is in exactly one of the two. The wrapper is application/json; only the\nnested patch is RFC 6902. An empty entityIds list is REFUSED, never read as \"every item\", and\nat most 100 ids come per request. The document is validated first, so one unwritable path\nwrites nothing: the paths are patchInitiativeItem's, /sortOrder stays refused, and a hidden\ncolumn answers the same notFound, never a silent drop. A 200 is replayed, so retrying the\nfailures needs a FRESH Idempotency-Key.\nWhen to use: module scope, one patch over several itemIds from listInitiativeItems.\nNot here: one item (patchInitiativeItem answers the resource itself), and creating, deleting\nor reordering.",
        "operationId": "patchInitiativeItems",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeItemsBulkPatchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemsBulkPatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/items/{itemId}": {
      "get": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Returns one initiative item of the caller's client by id, always in the Full shape. An item of\nanother client, or one in a company the caller cannot see, is reported as notFound.\nWhen to use: module scope, on an itemId from listInitiativeItems.\nNot here: the item's HTML content, which getInitiativeItemContent serves, and the same item\nread through a report part, which getReportInitiativeItem serves — on a completed or archived\nreport that answers from the frozen snapshot, so the two can legitimately differ.",
        "description": "Returns one initiative item of the caller's client by id, always in the Full shape. An item of\nanother client, or one in a company the caller cannot see, is reported as notFound.\nWhen to use: module scope, on an itemId from listInitiativeItems.\nNot here: the item's HTML content, which getInitiativeItemContent serves, and the same item\nread through a report part, which getReportInitiativeItem serves — on a completed or archived\nreport that answers from the frozen snapshot, so the two can legitimately differ.",
        "operationId": "getInitiativeItem",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Patches one initiative item of your client, returned in the Full shape. Writable paths:\n/companyId (re-appends it last), /siteId, /assigneeId, /statusId, /priorityId, /name, /summary,\n/nextSteps, /budgetEstimate, /oneTimeBudget, /recurringBudget, /recurringPeriod,\n/recurringTotal, /quantity, /month, /year, /effectiveDate, /cancellationDate, /tagsIds and\n/columns/{columnId}. Any other path — /sortOrder, /contentLength, /id — is rejected with\nvalidationFailed and nothing is written, not even the valid ops. /tagsIds is a full REPLACEMENT\nset: omitted tags are removed. On /columns/{columnId} a remove equals a replace with null, and\nan unknown columnId and a hidden one answer the SAME notFound.\nWhen to use: module scope, one item, on an itemId from listInitiativeItems.\nNot here: reordering (updateInitiativeItemSortOrder), several items at once\n(patchInitiativeItems), the HTML content (updateInitiativeItemContent), and the report-part twin\npatchReportInitiativeItem, DRAFT only.",
        "description": "Patches one initiative item of your client, returned in the Full shape. Writable paths:\n/companyId (re-appends it last), /siteId, /assigneeId, /statusId, /priorityId, /name, /summary,\n/nextSteps, /budgetEstimate, /oneTimeBudget, /recurringBudget, /recurringPeriod,\n/recurringTotal, /quantity, /month, /year, /effectiveDate, /cancellationDate, /tagsIds and\n/columns/{columnId}. Any other path — /sortOrder, /contentLength, /id — is rejected with\nvalidationFailed and nothing is written, not even the valid ops. /tagsIds is a full REPLACEMENT\nset: omitted tags are removed. On /columns/{columnId} a remove equals a replace with null, and\nan unknown columnId and a hidden one answer the SAME notFound.\nWhen to use: module scope, one item, on an itemId from listInitiativeItems.\nNot here: reordering (updateInitiativeItemSortOrder), several items at once\n(patchInitiativeItems), the HTML content (updateInitiativeItemContent), and the report-part twin\npatchReportInitiativeItem, DRAFT only.",
        "operationId": "patchInitiativeItem",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/items/{itemId}/sort-order": {
      "put": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Moves one initiative item inside the module's manual order and returns it in the Full shape.\nafterItemId is the item the moved item lands DIRECTLY after; null, 0 or an omitted property all\nmean the FIRST position, and anchoring an item on itself is a no-op that returns it unchanged.\nThere is no absolute index here. The order is ONE client-wide sequence, so the anchor may be an\nitem of any company you can see — a report renders an ordered subsequence of it, which is why a\nmove here changes what every report of that client shows. Either id you cannot reach — the item\nor the anchor — is reported as notFound and nothing is moved.\nWhen to use: module scope, on itemIds from listInitiativeItems, read in sortBy=SortOrder order.\nNot here: /sortOrder stays REFUSED by patchInitiativeItem and patchInitiativeItems — this is the\nonly way to reorder ITEMS — and the column order and the tag vocabulary's order, which\nupdateInitiativeColumnSortOrder and updateInitiativeTagSortOrder own.",
        "description": "Moves one initiative item inside the module's manual order and returns it in the Full shape.\nafterItemId is the item the moved item lands DIRECTLY after; null, 0 or an omitted property all\nmean the FIRST position, and anchoring an item on itself is a no-op that returns it unchanged.\nThere is no absolute index here. The order is ONE client-wide sequence, so the anchor may be an\nitem of any company you can see — a report renders an ordered subsequence of it, which is why a\nmove here changes what every report of that client shows. Either id you cannot reach — the item\nor the anchor — is reported as notFound and nothing is moved.\nWhen to use: module scope, on itemIds from listInitiativeItems, read in sortBy=SortOrder order.\nNot here: /sortOrder stays REFUSED by patchInitiativeItem and patchInitiativeItems — this is the\nonly way to reorder ITEMS — and the column order and the tag vocabulary's order, which\nupdateInitiativeColumnSortOrder and updateInitiativeTagSortOrder own.",
        "operationId": "updateInitiativeItemSortOrder",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeItemSortOrderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/items/{itemId}/copy": {
      "post": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Duplicates one initiative item and returns the NEW item in the Full shape. No request body —\neverything comes from the source. The copy's name is the source's prefixed with \"Copy of \"\n(truncated to 255 characters), and it lands DIRECTLY after the source, not at the end. Its custom\ncolumn values, tag assignments and HTML content come across too. An item of another client, or one in a company you cannot see, is notFound and\nnothing is copied. An Idempotency-Key makes a retry safe (no second copy).\nWhen to use: module scope, on an itemId from listInitiativeItems, to seed a new item from an\nexisting one instead of restating its whole body to createInitiativeItem.\nNext: returns the NEW itemId — not the source's — taken by patchInitiativeItem,\nupdateInitiativeItemContent and updateInitiativeItemSortOrder.\nNot here: the same copy in report scope, which copyReportInitiativeItem does on a DRAFT report\nonly; and there is no cross-client copy.",
        "description": "Duplicates one initiative item and returns the NEW item in the Full shape. No request body —\neverything comes from the source. The copy's name is the source's prefixed with \"Copy of \"\n(truncated to 255 characters), and it lands DIRECTLY after the source, not at the end. Its custom\ncolumn values, tag assignments and HTML content come across too. An item of another client, or one in a company you cannot see, is notFound and\nnothing is copied. An Idempotency-Key makes a retry safe (no second copy).\nWhen to use: module scope, on an itemId from listInitiativeItems, to seed a new item from an\nexisting one instead of restating its whole body to createInitiativeItem.\nNext: returns the NEW itemId — not the source's — taken by patchInitiativeItem,\nupdateInitiativeItemContent and updateInitiativeItemSortOrder.\nNot here: the same copy in report scope, which copyReportInitiativeItem does on a DRAFT report\nonly; and there is no cross-client copy.",
        "operationId": "copyInitiativeItem",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/items/{itemId}/relationships/technology-items": {
      "post": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Links technology items to one initiative item; returns the item's relationships after the write and one errors\nentry per id not linked. technologyItemIds come from listTechnologyItems (technology/groups/{groupId}/items):\n1-100 per call, items of the initiative item's company. An existing pair is a no-op, not an error; a repeated id\ncounts once. A technology item linked to another initiative is validationFailed in errors (unlink it there\nfirst); an unknown id or another company's item is notFound; the others are linked: 200 even when every id\nfailed. An empty, longer or non-positive list is validationFailed, nothing written; an unreachable item is\nnotFound.\nWhen to use: on an itemId from listInitiativeItems, to connect technology items to the initiative.\nNext: getInitiativeItem re-reads the block; listInitiativeItems with technologyItemId lists the item.\nNot here: removing a link (unlinkInitiativeItemTechnologyItems); findings (linkInitiativeItemAssessmentItems).",
        "description": "Links technology items to one initiative item; returns the item's relationships after the write and one errors\nentry per id not linked. technologyItemIds come from listTechnologyItems (technology/groups/{groupId}/items):\n1-100 per call, items of the initiative item's company. An existing pair is a no-op, not an error; a repeated id\ncounts once. A technology item linked to another initiative is validationFailed in errors (unlink it there\nfirst); an unknown id or another company's item is notFound; the others are linked: 200 even when every id\nfailed. An empty, longer or non-positive list is validationFailed, nothing written; an unreachable item is\nnotFound.\nWhen to use: on an itemId from listInitiativeItems, to connect technology items to the initiative.\nNext: getInitiativeItem re-reads the block; listInitiativeItems with technologyItemId lists the item.\nNot here: removing a link (unlinkInitiativeItemTechnologyItems); findings (linkInitiativeItemAssessmentItems).",
        "operationId": "linkInitiativeItemTechnologyItems",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeTechnologyItemsLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/items/{itemId}/relationships/technology-items/unlink": {
      "post": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Unlinks technology items from one initiative item; returns the item's relationships after the write and one\nerrors entry per id not unlinked. technologyItemIds come from listTechnologyItems or getInitiativeItem's\nrelationships.technologyItems: 1-100 per call; a repeated id counts once. Unlike a link, where an existing pair\nis a no-op, a technology item not linked to this item is notFound in errors while the others are unlinked: 200\neven when every id failed. Only the link goes; the technology item stays. An empty, longer or non-positive list\nis validationFailed, nothing written; an unreachable item is notFound.\nWhen to use: on an itemId from listInitiativeItems, to disconnect technology items from the initiative.\nNext: getInitiativeItem re-reads the block.\nNot here: adding a link (linkInitiativeItemTechnologyItems); findings (unlinkInitiativeItemAssessmentItems).",
        "description": "Unlinks technology items from one initiative item; returns the item's relationships after the write and one\nerrors entry per id not unlinked. technologyItemIds come from listTechnologyItems or getInitiativeItem's\nrelationships.technologyItems: 1-100 per call; a repeated id counts once. Unlike a link, where an existing pair\nis a no-op, a technology item not linked to this item is notFound in errors while the others are unlinked: 200\neven when every id failed. Only the link goes; the technology item stays. An empty, longer or non-positive list\nis validationFailed, nothing written; an unreachable item is notFound.\nWhen to use: on an itemId from listInitiativeItems, to disconnect technology items from the initiative.\nNext: getInitiativeItem re-reads the block.\nNot here: adding a link (linkInitiativeItemTechnologyItems); findings (unlinkInitiativeItemAssessmentItems).",
        "operationId": "unlinkInitiativeItemTechnologyItems",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeTechnologyItemsLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/items/{itemId}/relationships/assessment-items": {
      "post": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Links assessment items (findings) to one initiative item; returns the item's relationships after the write and\none errors entry per id not linked. assessmentItemIds are the itemId of listAssessmentItems, 1-100 per call, of\na draft report of the item's company: a completed report's finding, an unknown id or one you cannot see is\nnotFound in errors, the others are linked: 200 even when every id failed. An existing pair is a no-op; a\nrepeated id counts once. One report at a time: a busy item or report is validationFailed after the earlier\nreports were written; re-read and retry. An empty, longer or non-positive list is validationFailed, nothing\nwritten; an unreachable item is notFound.\nWhen to use: on an itemId from listInitiativeItems, to connect findings.\nNext: getInitiativeItem re-reads the block; listInitiativeItems with assessmentItemId lists the item.\nNot here: removing a link (unlinkInitiativeItemAssessmentItems); technology items\n(linkInitiativeItemTechnologyItems).",
        "description": "Links assessment items (findings) to one initiative item; returns the item's relationships after the write and\none errors entry per id not linked. assessmentItemIds are the itemId of listAssessmentItems, 1-100 per call, of\na draft report of the item's company: a completed report's finding, an unknown id or one you cannot see is\nnotFound in errors, the others are linked: 200 even when every id failed. An existing pair is a no-op; a\nrepeated id counts once. One report at a time: a busy item or report is validationFailed after the earlier\nreports were written; re-read and retry. An empty, longer or non-positive list is validationFailed, nothing\nwritten; an unreachable item is notFound.\nWhen to use: on an itemId from listInitiativeItems, to connect findings.\nNext: getInitiativeItem re-reads the block; listInitiativeItems with assessmentItemId lists the item.\nNot here: removing a link (unlinkInitiativeItemAssessmentItems); technology items\n(linkInitiativeItemTechnologyItems).",
        "operationId": "linkInitiativeItemAssessmentItems",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeAssessmentItemsLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/items/{itemId}/relationships/assessment-items/unlink": {
      "post": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Unlinks assessment items (findings) from one initiative item; returns the item's relationships after the write\nand one errors entry per id not unlinked. assessmentItemIds come from getInitiativeItem's\nrelationships.assessmentItems: 1-100 per call; a repeated id counts once. Unlike a link, where an existing pair\nis a no-op, a finding not linked to this item, or one you cannot see, is notFound in errors while the others are\nunlinked: 200 even when every id failed. Only the link goes; the finding stays. One report at a time: a busy\nitem or report is validationFailed after the earlier reports were written; re-read and retry. An empty, longer\nor non-positive list is validationFailed, nothing written; an unreachable item is notFound.\nWhen to use: on an itemId from listInitiativeItems, to disconnect findings.\nNext: getInitiativeItem re-reads the block.\nNot here: adding a link (linkInitiativeItemAssessmentItems); technology items\n(unlinkInitiativeItemTechnologyItems).",
        "description": "Unlinks assessment items (findings) from one initiative item; returns the item's relationships after the write\nand one errors entry per id not unlinked. assessmentItemIds come from getInitiativeItem's\nrelationships.assessmentItems: 1-100 per call; a repeated id counts once. Unlike a link, where an existing pair\nis a no-op, a finding not linked to this item, or one you cannot see, is notFound in errors while the others are\nunlinked: 200 even when every id failed. Only the link goes; the finding stays. One report at a time: a busy\nitem or report is validationFailed after the earlier reports were written; re-read and retry. An empty, longer\nor non-positive list is validationFailed, nothing written; an unreachable item is notFound.\nWhen to use: on an itemId from listInitiativeItems, to disconnect findings.\nNext: getInitiativeItem re-reads the block.\nNot here: adding a link (linkInitiativeItemAssessmentItems); technology items\n(unlinkInitiativeItemTechnologyItems).",
        "operationId": "unlinkInitiativeItemAssessmentItems",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeAssessmentItemsLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/items/{itemId}/content": {
      "get": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Returns the HTML content of one initiative item — the long-form body that no item projection\ncarries. An item of another client, or one in a company the caller cannot see, is reported as\nnotFound.\nWhen to use: module scope, on an itemId from listInitiativeItems, whose contentLength says how\nlarge the string this returns will be.\nNext: updateInitiativeItemContent replaces this same string.\nNot here: images EMBEDDED in the HTML are not retrievable through this API — v1 publishes no\nimage operation, so an img tag in the content points at something an external caller cannot\nfetch. The text itself is complete. The same content read through a report part is\ngetReportInitiativeItemContent, which serves the frozen snapshot once the report is completed.",
        "description": "Returns the HTML content of one initiative item — the long-form body that no item projection\ncarries. An item of another client, or one in a company the caller cannot see, is reported as\nnotFound.\nWhen to use: module scope, on an itemId from listInitiativeItems, whose contentLength says how\nlarge the string this returns will be.\nNext: updateInitiativeItemContent replaces this same string.\nNot here: images EMBEDDED in the HTML are not retrievable through this API — v1 publishes no\nimage operation, so an img tag in the content points at something an external caller cannot\nfetch. The text itself is complete. The same content read through a report part is\ngetReportInitiativeItemContent, which serves the frozen snapshot once the report is completed.",
        "operationId": "getInitiativeItemContent",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemContentModelExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Replaces the HTML content of one initiative item and returns the stored content. The write is a\nfull REPLACEMENT — the body carries the whole string, it is not merged into what is there — and\ncontent is not writable through createInitiativeItem or patchInitiativeItem, this is its only\nwrite path. An item of another client, or one in a company you cannot see, is reported as\nnotFound and nothing is written.\nWhen to use: module scope, on an itemId from listInitiativeItems.\nNot here: images embedded in the HTML cannot be uploaded or retrieved through this API — v1\npublishes no image operation, so content referencing an img the caller did not put there through\nthe web application will render against something an external caller cannot fetch. The\nreport-part twin updateReportInitiativeItemContent writes this same string, DRAFT only, and\ngetReportInitiativeItemContent reads it on every report status.",
        "description": "Replaces the HTML content of one initiative item and returns the stored content. The write is a\nfull REPLACEMENT — the body carries the whole string, it is not merged into what is there — and\ncontent is not writable through createInitiativeItem or patchInitiativeItem, this is its only\nwrite path. An item of another client, or one in a company you cannot see, is reported as\nnotFound and nothing is written.\nWhen to use: module scope, on an itemId from listInitiativeItems.\nNot here: images embedded in the HTML cannot be uploaded or retrieved through this API — v1\npublishes no image operation, so content referencing an img the caller did not put there through\nthe web application will render against something an external caller cannot fetch. The\nreport-part twin updateReportInitiativeItemContent writes this same string, DRAFT only, and\ngetReportInitiativeItemContent reads it on every report status.",
        "operationId": "updateInitiativeItemContent",
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeItemContentModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemContentModelExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/columns": {
      "get": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Lists the column definitions of the caller's client Initiatives module, in the module's own\ncolumn order. The definitions are writable through patchInitiativeColumn\nand updateInitiativeColumnSortOrder; creating a column is not available on any API.\nWhen to use: to learn what an item's fields mean before reading items — a custom column's\ncustomColumnTypeEnum says how to read the values an item holds in it, and the Status and\nPriority columns carry the option lists that resolve an item's status / priority.\nNext: returns the columnId that appears in an item's columnValues, and the option ids the\nstatusId / priorityId filters of listInitiativeItems take.\nNot here: the columns behind a report's Initiatives part, which listReportInitiativeColumns\nreturns — on a completed or archived report those are the definitions frozen at completion\ntime, and only they can interpret that report's values.",
        "description": "Lists the column definitions of the caller's client Initiatives module, in the module's own\ncolumn order. The definitions are writable through patchInitiativeColumn\nand updateInitiativeColumnSortOrder; creating a column is not available on any API.\nWhen to use: to learn what an item's fields mean before reading items — a custom column's\ncustomColumnTypeEnum says how to read the values an item holds in it, and the Status and\nPriority columns carry the option lists that resolve an item's status / priority.\nNext: returns the columnId that appears in an item's columnValues, and the option ids the\nstatusId / priorityId filters of listInitiativeItems take.\nNot here: the columns behind a report's Initiatives part, which listReportInitiativeColumns\nreturns — on a completed or archived report those are the definitions frozen at completion\ntime, and only they can interpret that report's values.",
        "operationId": "listInitiativeColumns",
        "parameters": [
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeColumnResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/columns/{columnId}": {
      "patch": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Patches one column DEFINITION of the caller's client Initiatives module and returns the updated\ncolumn. Writable paths: /label, /description and /isInternal. Any other path — /isActive,\n/sortOrder, /options, /typeEnum, /id — is rejected with validationFailed and nothing is written,\nnot even the operations that would have been valid. /isInternal is legal only where the column's\nisInternalAllowed is true; a rollup column answers validationFailed. /label may not be cleared.\nA column of another client, and an internal column your permissions hide, are both notFound.\nWhen to use: module scope, on a columnId from listInitiativeColumns.\nNot here: activation — no API writes it per column, and updateInitiativeRecurringColumns moves it\nonly for the recurring group; the order (updateInitiativeColumnSortOrder); the option lists,\nread-only on every column type; and an item's VALUE in the column, which patchInitiativeItem\nwrites at the column's patchPath.",
        "description": "Patches one column DEFINITION of the caller's client Initiatives module and returns the updated\ncolumn. Writable paths: /label, /description and /isInternal. Any other path — /isActive,\n/sortOrder, /options, /typeEnum, /id — is rejected with validationFailed and nothing is written,\nnot even the operations that would have been valid. /isInternal is legal only where the column's\nisInternalAllowed is true; a rollup column answers validationFailed. /label may not be cleared.\nA column of another client, and an internal column your permissions hide, are both notFound.\nWhen to use: module scope, on a columnId from listInitiativeColumns.\nNot here: activation — no API writes it per column, and updateInitiativeRecurringColumns moves it\nonly for the recurring group; the order (updateInitiativeColumnSortOrder); the option lists,\nread-only on every column type; and an item's VALUE in the column, which patchInitiativeItem\nwrites at the column's patchPath.",
        "operationId": "patchInitiativeColumn",
        "parameters": [
          {
            "name": "columnId",
            "in": "path",
            "description": "Column id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeColumnResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/columns/{columnId}/sort-order": {
      "put": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Moves one column inside the module's column order and returns the updated column. afterColumnId\nis the column the moved column lands DIRECTLY after; null, 0 or an omitted property all mean the\nFIRST position, and anchoring a column on itself is a no-op that returns it unchanged. There is no\nabsolute index here. The order is the one listInitiativeColumns publishes and the one the\napplication renders. Either id you cannot reach — the column or the anchor — is reported as\nnotFound and nothing is moved.\nWhen to use: module scope, on columnIds from listInitiativeColumns, read in the order that\noperation returns.\nNot here: /sortOrder stays REFUSED by patchInitiativeColumn — this is the only way to reorder\ncolumns — and the item order, which updateInitiativeItemSortOrder owns.",
        "description": "Moves one column inside the module's column order and returns the updated column. afterColumnId\nis the column the moved column lands DIRECTLY after; null, 0 or an omitted property all mean the\nFIRST position, and anchoring a column on itself is a no-op that returns it unchanged. There is no\nabsolute index here. The order is the one listInitiativeColumns publishes and the one the\napplication renders. Either id you cannot reach — the column or the anchor — is reported as\nnotFound and nothing is moved.\nWhen to use: module scope, on columnIds from listInitiativeColumns, read in the order that\noperation returns.\nNot here: /sortOrder stays REFUSED by patchInitiativeColumn — this is the only way to reorder\ncolumns — and the item order, which updateInitiativeItemSortOrder owns.",
        "operationId": "updateInitiativeColumnSortOrder",
        "parameters": [
          {
            "name": "columnId",
            "in": "path",
            "description": "Column id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeColumnSortOrderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeColumnResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/columns/recurring": {
      "put": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Shows or hides the whole recurring-columns group of the caller's client Initiatives module at\nonce — the recurring budget, period, total, quantity and the effective / cancellation dates. There\nis no per-column form of this write on any API: isActive is not on patchInitiativeColumn's\nwritable surface, so this operation is the only writer of that field. Turning the group off also\nclears the calling credential's own saved filter values on those columns, never another\ncredential's. Which columns belong to the group is fixed by the module — read isRecurring from\nlistInitiativeColumns.\nWhen to use: module scope, to switch recurring-cost tracking on or off for the whole client.\nNot here: this needs a NARROWER permission than the other column operations\n(Initiatives_Settings_Columns_Recurring rather than Initiatives_Columns), so a Builder credential\nthat may patch, delete and reorder columns still answers 403 here. Report scope has no equivalent.",
        "description": "Shows or hides the whole recurring-columns group of the caller's client Initiatives module at\nonce — the recurring budget, period, total, quantity and the effective / cancellation dates. There\nis no per-column form of this write on any API: isActive is not on patchInitiativeColumn's\nwritable surface, so this operation is the only writer of that field. Turning the group off also\nclears the calling credential's own saved filter values on those columns, never another\ncredential's. Which columns belong to the group is fixed by the module — read isRecurring from\nlistInitiativeColumns.\nWhen to use: module scope, to switch recurring-cost tracking on or off for the whole client.\nNot here: this needs a NARROWER permission than the other column operations\n(Initiatives_Settings_Columns_Recurring rather than Initiatives_Columns), so a Builder credential\nthat may patch, delete and reorder columns still answers 403 here. Report scope has no equivalent.",
        "operationId": "updateInitiativeRecurringColumns",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeRecurringColumnsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/tags/{tagId}/sort-order": {
      "put": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Moves one tag inside the Tags Library order and returns the updated tag. afterTagId is the tag the\nmoved tag lands DIRECTLY after; null, 0 or an omitted property all mean the FIRST position, and\nanchoring a tag on itself is a no-op that returns it unchanged. The order is the one\nlistInitiativeTags publishes and the one the tag picker renders. Either id you cannot reach — the\ntag or the anchor — is reported as notFound and nothing is moved.\nWhen to use: module scope, on tagIds from listInitiativeTags.\nNot here: /sortOrder stays REFUSED by patchInitiativeTag — this is the only way to reorder the\nvocabulary — and changing WHICH items carry a tag, which is the /tagsIds path of\npatchInitiativeItem.",
        "description": "Moves one tag inside the Tags Library order and returns the updated tag. afterTagId is the tag the\nmoved tag lands DIRECTLY after; null, 0 or an omitted property all mean the FIRST position, and\nanchoring a tag on itself is a no-op that returns it unchanged. The order is the one\nlistInitiativeTags publishes and the one the tag picker renders. Either id you cannot reach — the\ntag or the anchor — is reported as notFound and nothing is moved.\nWhen to use: module scope, on tagIds from listInitiativeTags.\nNot here: /sortOrder stays REFUSED by patchInitiativeTag — this is the only way to reorder the\nvocabulary — and changing WHICH items carry a tag, which is the /tagsIds path of\npatchInitiativeItem.",
        "operationId": "updateInitiativeTagSortOrder",
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "description": "Tag id, from the module's own tag vocabulary.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeTagSortOrderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeTagResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/tags": {
      "get": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Lists the tag vocabulary of the caller's client Initiatives module, in the Tags Library order.\nWhen to use: to resolve or discover a tag before filtering items by it, assigning it or editing\nthe vocabulary itself.\nNext: returns the tagId taken by the tagId / tagIdIn filters of listInitiativeItems, by the\ntagsIds of createInitiativeItem and the /tagsIds path of patchInitiativeItem, and by\npatchInitiativeTag.\nNot here: these tags are the Initiatives module's own vocabulary — they are not the tags used\nby reports, plans or metrics. The report-part twin is listReportInitiativeTags, which on a\ncompleted or archived report serves the vocabulary frozen at completion time; read tag ids for a\nreport from there, not from here.",
        "description": "Lists the tag vocabulary of the caller's client Initiatives module, in the Tags Library order.\nWhen to use: to resolve or discover a tag before filtering items by it, assigning it or editing\nthe vocabulary itself.\nNext: returns the tagId taken by the tagId / tagIdIn filters of listInitiativeItems, by the\ntagsIds of createInitiativeItem and the /tagsIds path of patchInitiativeItem, and by\npatchInitiativeTag.\nNot here: these tags are the Initiatives module's own vocabulary — they are not the tags used\nby reports, plans or metrics. The report-part twin is listReportInitiativeTags, which on a\ncompleted or archived report serves the vocabulary frozen at completion time; read tag ids for a\nreport from there, not from here.",
        "operationId": "listInitiativeTags",
        "parameters": [
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeTagResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Creates one tag in the caller's client Initiatives tag vocabulary and returns it. The tag lands\nat the END of the Tags Library order — there is no position on this surface. name is trimmed,\nmay not be blank, and must be unique within the vocabulary (case-insensitive); a name another\ntag already holds is refused with validationFailed and nothing is created. color is optional.\nAn Idempotency-Key makes a retry safe: without one a repeat is refused as a duplicate name\nrather than replayed.\nWhen to use: module scope, to add a tag to the vocabulary before assigning it to items.\nNext: returns the tagId taken by patchInitiativeTag, the tagId / tagIdIn\nfilters of listInitiativeItems, the tagsIds of createInitiativeItem and the /tagsIds path of\npatchInitiativeItem.\nNot here: this creates a tag, it does not put one on an item — that is the tagsIds of\ncreateInitiativeItem or the /tagsIds path of patchInitiativeItem. Report scope creates no tags.",
        "description": "Creates one tag in the caller's client Initiatives tag vocabulary and returns it. The tag lands\nat the END of the Tags Library order — there is no position on this surface. name is trimmed,\nmay not be blank, and must be unique within the vocabulary (case-insensitive); a name another\ntag already holds is refused with validationFailed and nothing is created. color is optional.\nAn Idempotency-Key makes a retry safe: without one a repeat is refused as a duplicate name\nrather than replayed.\nWhen to use: module scope, to add a tag to the vocabulary before assigning it to items.\nNext: returns the tagId taken by patchInitiativeTag, the tagId / tagIdIn\nfilters of listInitiativeItems, the tagsIds of createInitiativeItem and the /tagsIds path of\npatchInitiativeItem.\nNot here: this creates a tag, it does not put one on an item — that is the tagsIds of\ncreateInitiativeItem or the /tagsIds path of patchInitiativeItem. Report scope creates no tags.",
        "operationId": "createInitiativeTag",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeTagCreateResource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeTagResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiatives/tags/{tagId}": {
      "patch": {
        "tags": [
          "Initiatives"
        ],
        "summary": "Renames one tag of the caller's client Initiatives tag vocabulary, or changes its colour, and\nreturns the updated tag. Writable paths: /name and /color. Any other path — /sortOrder, /id — is\nrejected with validationFailed and nothing is written, not even the operations that would have\nbeen valid. name must stay unique within the vocabulary (case-insensitive) and may not be blank.\nA remove on /color, or a replace with null, clears the swatch. A tag of another client is\nreported as notFound and nothing is written.\nWhen to use: module scope, on a tagId from listInitiativeTags. This edits the VOCABULARY: every\nitem already carrying the tag reports the new name, with no per-item write.\nNot here: reordering the vocabulary — /sortOrder stays REFUSED here and\nupdateInitiativeTagSortOrder owns the order — and changing WHICH items carry the tag, which is\nthe /tagsIds path of patchInitiativeItem.",
        "description": "Renames one tag of the caller's client Initiatives tag vocabulary, or changes its colour, and\nreturns the updated tag. Writable paths: /name and /color. Any other path — /sortOrder, /id — is\nrejected with validationFailed and nothing is written, not even the operations that would have\nbeen valid. name must stay unique within the vocabulary (case-insensitive) and may not be blank.\nA remove on /color, or a replace with null, clears the swatch. A tag of another client is\nreported as notFound and nothing is written.\nWhen to use: module scope, on a tagId from listInitiativeTags. This edits the VOCABULARY: every\nitem already carrying the tag reports the new name, with no per-item write.\nNot here: reordering the vocabulary — /sortOrder stays REFUSED here and\nupdateInitiativeTagSortOrder owns the order — and changing WHICH items carry the tag, which is\nthe /tagsIds path of patchInitiativeItem.",
        "operationId": "patchInitiativeTag",
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "description": "Tag id, from the module's own tag vocabulary.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeTagResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiativeTemplates": {
      "get": {
        "tags": [
          "InitiativeTemplates"
        ],
        "summary": "Lists your client's initiative templates, paged (25 by default, at most 100), with name, id, group and tag\nfilters and a sort. sortBy=SortOrder (default) is the application's order: the grouped templates first, by\ntheir group's order then their own, the ungrouped templates last. Each template carries its group as id +\nname, its tags and its priority with its label; the HTML content is never listed, only its contentLength.\nA template has one shape: there is no view or fields parameter.\nWhen to use: to browse the library an initiative item can start from, with its budget lines.\nNext: getInitiativeTemplate for one template.\nNot here: the content itself (getInitiativeTemplateContent); creating or editing a template\n(createInitiativeTemplate, patchInitiativeTemplate); reordering, moving between groups or creating an item\nfrom a template (application only); template groups as a list (each template carries its group).",
        "description": "Lists your client's initiative templates, paged (25 by default, at most 100), with name, id, group and tag\nfilters and a sort. sortBy=SortOrder (default) is the application's order: the grouped templates first, by\ntheir group's order then their own, the ungrouped templates last. Each template carries its group as id +\nname, its tags and its priority with its label; the HTML content is never listed, only its contentLength.\nA template has one shape: there is no view or fields parameter.\nWhen to use: to browse the library an initiative item can start from, with its budget lines.\nNext: getInitiativeTemplate for one template.\nNot here: the content itself (getInitiativeTemplateContent); creating or editing a template\n(createInitiativeTemplate, patchInitiativeTemplate); reordering, moving between groups or creating an item\nfrom a template (application only); template groups as a list (each template carries its group).",
        "operationId": "listInitiativeTemplates",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Templates whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Templates whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Templates whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Templates whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Templates whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Templates whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Templates whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Templates whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the template with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the template with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the templates with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the templates with these ids."
            }
          },
          {
            "name": "GroupId",
            "in": "query",
            "description": "Templates in the template group with this id (read it off a template's group object).",
            "schema": {
              "type": "integer",
              "description": "Templates in the template group with this id (read it off a template's group object).",
              "format": "int32"
            }
          },
          {
            "name": "GroupIdIn",
            "in": "query",
            "description": "Templates in any of the template groups with these ids (read off the templates' group objects).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Templates in any of the template groups with these ids (read off the templates' group objects)."
            }
          },
          {
            "name": "TagId",
            "in": "query",
            "description": "Templates carrying the tag with this id (see listInitiativeTags).",
            "schema": {
              "type": "integer",
              "description": "Templates carrying the tag with this id (see listInitiativeTags).",
              "format": "int32"
            }
          },
          {
            "name": "TagIdIn",
            "in": "query",
            "description": "Templates carrying any of the tags with these ids (see listInitiativeTags).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Templates carrying any of the tags with these ids (see listInitiativeTags)."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for initiative templates. Allowed values: SortOrder (the default: the grouped\ntemplates first, by their group's order then their own, the ungrouped templates last), Name, CreatedAt,\nUpdatedAt.",
            "schema": {
              "enum": [
                "sortOrder",
                "name",
                "createdAt",
                "updatedAt"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for initiative templates. Allowed values: SortOrder (the default: the grouped\ntemplates first, by their group's order then their own, the ungrouped templates last), Name, CreatedAt,\nUpdatedAt."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeTemplateResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "InitiativeTemplates"
        ],
        "summary": "Creates one initiative template in your client's library and returns it as getInitiativeTemplate reads it, at\nthe end of its group, or of the ungrouped templates. name is required and trimmed; a name another template of\nyour client holds, compared case-insensitively, is validationFailed, as are an unknown priorityId or tag.\noneTimeBudget is derived from the three budget lines. A field of a column hidden from you as internal\n(priorityId, tagsIds, summary, nextSteps, budgetEstimate) is not stored. groupId is optional: null, 0 or\nomitted creates an ungrouped template, and a group of another client or an id that matches no group is\nnotFound. A refused create writes nothing.\nWhen to use: to add a template an initiative item can start from.\nNext: updateInitiativeTemplateContent for its HTML content; patchInitiativeTemplate to change it.\nNot here: moving templates between groups, reordering them and creating template groups (application only).",
        "description": "Creates one initiative template in your client's library and returns it as getInitiativeTemplate reads it, at\nthe end of its group, or of the ungrouped templates. name is required and trimmed; a name another template of\nyour client holds, compared case-insensitively, is validationFailed, as are an unknown priorityId or tag.\noneTimeBudget is derived from the three budget lines. A field of a column hidden from you as internal\n(priorityId, tagsIds, summary, nextSteps, budgetEstimate) is not stored. groupId is optional: null, 0 or\nomitted creates an ungrouped template, and a group of another client or an id that matches no group is\nnotFound. A refused create writes nothing.\nWhen to use: to add a template an initiative item can start from.\nNext: updateInitiativeTemplateContent for its HTML content; patchInitiativeTemplate to change it.\nNot here: moving templates between groups, reordering them and creating template groups (application only).",
        "operationId": "createInitiativeTemplate",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeTemplateCreateResource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeTemplateResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiativeTemplates/{templateId}": {
      "get": {
        "tags": [
          "InitiativeTemplates"
        ],
        "summary": "Returns one initiative template of your client by id, in the shape listInitiativeTemplates lists it. A\ntemplate of another client and an id that matches nothing are both reported as notFound.\nWhen to use: on a templateId from listInitiativeTemplates.\nNext: getInitiativeTemplateContent for its HTML content.\nNot here: editing the template (patchInitiativeTemplate); reordering it, moving it to another group or\ncreating an item from it (application only).",
        "description": "Returns one initiative template of your client by id, in the shape listInitiativeTemplates lists it. A\ntemplate of another client and an id that matches nothing are both reported as notFound.\nWhen to use: on a templateId from listInitiativeTemplates.\nNext: getInitiativeTemplateContent for its HTML content.\nNot here: editing the template (patchInitiativeTemplate); reordering it, moving it to another group or\ncreating an item from it (application only).",
        "operationId": "getInitiativeTemplate",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Initiative template id (see listInitiativeTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeTemplateResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "InitiativeTemplates"
        ],
        "summary": "Patches one initiative template of your client and returns it as getInitiativeTemplate reads it. Writable\npaths: /name, /summary, /nextSteps, /priorityId, /budgetEstimate, /itemsBudget, /laborBudget, /partsBudget,\n/recurringBudget, /recurringPeriod, /recurringTotal, /quantity, /month, /year, /effectiveDate,\n/cancellationDate and /tagsIds, a full replacement set. Any other path (/groupId, /sortOrder, /content,\n/oneTimeBudget, ...) and move or copy are validationFailed and nothing is written. /name may not be blank,\nremoved or null; a remove or null clears any other path. oneTimeBudget is re-derived. A template of another\nclient or an unknown id is notFound, as is a path of a column hidden from you as internal.\nWhen to use: on a templateId from listInitiativeTemplates or createInitiativeTemplate.\nNext: getInitiativeTemplate re-reads it.\nNot here: the content (updateInitiativeTemplateContent); moving the template to another group or reordering\nit (application only).",
        "description": "Patches one initiative template of your client and returns it as getInitiativeTemplate reads it. Writable\npaths: /name, /summary, /nextSteps, /priorityId, /budgetEstimate, /itemsBudget, /laborBudget, /partsBudget,\n/recurringBudget, /recurringPeriod, /recurringTotal, /quantity, /month, /year, /effectiveDate,\n/cancellationDate and /tagsIds, a full replacement set. Any other path (/groupId, /sortOrder, /content,\n/oneTimeBudget, ...) and move or copy are validationFailed and nothing is written. /name may not be blank,\nremoved or null; a remove or null clears any other path. oneTimeBudget is re-derived. A template of another\nclient or an unknown id is notFound, as is a path of a column hidden from you as internal.\nWhen to use: on a templateId from listInitiativeTemplates or createInitiativeTemplate.\nNext: getInitiativeTemplate re-reads it.\nNot here: the content (updateInitiativeTemplateContent); moving the template to another group or reordering\nit (application only).",
        "operationId": "patchInitiativeTemplate",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Initiative template id (see listInitiativeTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeTemplateResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/initiativeTemplates/{templateId}/content": {
      "get": {
        "tags": [
          "InitiativeTemplates"
        ],
        "summary": "Returns the HTML content of one initiative template of your client: the long-form body no template read\ncarries, which an item created from the template starts with. content is null when the template has none;\nthe template's contentLength says how long it is. A template of another client, or an id that matches\nnothing, is notFound.\nWhen to use: on a templateId from listInitiativeTemplates, whose contentLength says how large the string\nthis returns will be.\nNext: updateInitiativeTemplateContent replaces this same string.\nNot here: images EMBEDDED in the HTML are not retrievable through this API: v1 publishes no image operation,\nso an img tag in the content points at something an external caller cannot fetch. The text itself is\ncomplete.",
        "description": "Returns the HTML content of one initiative template of your client: the long-form body no template read\ncarries, which an item created from the template starts with. content is null when the template has none;\nthe template's contentLength says how long it is. A template of another client, or an id that matches\nnothing, is notFound.\nWhen to use: on a templateId from listInitiativeTemplates, whose contentLength says how large the string\nthis returns will be.\nNext: updateInitiativeTemplateContent replaces this same string.\nNot here: images EMBEDDED in the HTML are not retrievable through this API: v1 publishes no image operation,\nso an img tag in the content points at something an external caller cannot fetch. The text itself is\ncomplete.",
        "operationId": "getInitiativeTemplateContent",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Initiative template id (see listInitiativeTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeTemplateContentModelExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "InitiativeTemplates"
        ],
        "summary": "Replaces the HTML content of one initiative template of your client and returns the stored content. The\nwrite is a full REPLACEMENT: the body carries the whole string, it is not merged into what is there, and\nnull clears it. The HTML is sanitized: unsupported markup is dropped, and a script element, an on*\nevent-handler attribute or a javascript: URL is validationFailed with nothing written. Content is not\nwritable through createInitiativeTemplate or patchInitiativeTemplate; this is its only write path. A\ntemplate of another client, or an id that matches nothing, is notFound and nothing is written.\nWhen to use: on a templateId from listInitiativeTemplates or createInitiativeTemplate.\nNext: getInitiativeTemplate shows the new contentLength.\nNot here: images embedded in the HTML cannot be uploaded or retrieved through this API: v1 publishes no image\noperation.",
        "description": "Replaces the HTML content of one initiative template of your client and returns the stored content. The\nwrite is a full REPLACEMENT: the body carries the whole string, it is not merged into what is there, and\nnull clears it. The HTML is sanitized: unsupported markup is dropped, and a script element, an on*\nevent-handler attribute or a javascript: URL is validationFailed with nothing written. Content is not\nwritable through createInitiativeTemplate or patchInitiativeTemplate; this is its only write path. A\ntemplate of another client, or an id that matches nothing, is notFound and nothing is written.\nWhen to use: on a templateId from listInitiativeTemplates or createInitiativeTemplate.\nNext: getInitiativeTemplate shows the new contentLength.\nNot here: images embedded in the HTML cannot be uploaded or retrieved through this API: v1 publishes no image\noperation.",
        "operationId": "updateInitiativeTemplateContent",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Initiative template id (see listInitiativeTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeTemplateContentModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeTemplateContentModelExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Integrations": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "Lists the integrations of the caller's client (top-level integrations only), with typed\nfilters, sorting, paging and field selection.\nNext: the returned id is the integrationId taken by listIntegrationEntityConnections.\nNot here: connection details or keys are never published; the stored company mapping is\nlistIntegrationEntityConnections.",
        "description": "Lists the integrations of the caller's client (top-level integrations only), with typed\nfilters, sorting, paging and field selection.\nNext: the returned id is the integrationId taken by listIntegrationEntityConnections.\nNot here: connection details or keys are never published; the stored company mapping is\nlistIntegrationEntityConnections.",
        "operationId": "listIntegrations",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Integrations whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Integrations whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Integrations whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Integrations whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Integrations whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Integrations whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Integrations whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Integrations whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the integration with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the integration with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the integrations with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the integrations with these ids."
            }
          },
          {
            "name": "Type",
            "in": "query",
            "description": "Integrations of this integrated system.",
            "schema": {
              "enum": [
                "connectWise",
                "autotask",
                "kaseya",
                "syncro",
                "atera",
                "ninjaOne",
                "haloPSA",
                "pulseway",
                "serviceNow",
                "warranty",
                "liongard",
                "brightgauge",
                "office365",
                "itGluePSA",
                "huduData",
                "itBoost",
                "saaslio",
                "calendly",
                "timezest",
                "bookings",
                "simplesat",
                "smileback",
                "customerThermometer",
                "connectbooster",
                "wiseSync",
                "itGlueData",
                "ninjaOneData",
                "dattoRMMData"
              ],
              "type": "string",
              "description": "Integrations of this integrated system."
            }
          },
          {
            "name": "Types",
            "in": "query",
            "description": "Integrations of any of these integrated systems.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "connectWise",
                  "autotask",
                  "kaseya",
                  "syncro",
                  "atera",
                  "ninjaOne",
                  "haloPSA",
                  "pulseway",
                  "serviceNow",
                  "warranty",
                  "liongard",
                  "brightgauge",
                  "office365",
                  "itGluePSA",
                  "huduData",
                  "itBoost",
                  "saaslio",
                  "calendly",
                  "timezest",
                  "bookings",
                  "simplesat",
                  "smileback",
                  "customerThermometer",
                  "connectbooster",
                  "wiseSync",
                  "itGlueData",
                  "ninjaOneData",
                  "dattoRMMData"
                ],
                "type": "string"
              },
              "description": "Integrations of any of these integrated systems."
            }
          },
          {
            "name": "Status",
            "in": "query",
            "description": "Integrations with this stored status.",
            "schema": {
              "enum": [
                "inActive",
                "active"
              ],
              "type": "string",
              "description": "Integrations with this stored status."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for integrations. Allowed values: Name.",
            "schema": {
              "enum": [
                "name"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for integrations. Allowed values: Name."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "type",
                  "status",
                  "lastSyncDate"
                ],
                "type": "string",
                "description": "Selectable response fields of an integration (used by the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Integrations/{id}": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "Returns one integration of the caller's client by id (all public fields).\nWhen to use: resolving an integrationId already in hand; listIntegrations is where such an id\nis discovered in the first place.\nNot here: connection details or keys are never published; the stored company mapping is\nlistIntegrationEntityConnections.",
        "description": "Returns one integration of the caller's client by id (all public fields).\nWhen to use: resolving an integrationId already in hand; listIntegrations is where such an id\nis discovered in the first place.\nNot here: connection details or keys are never published; the stored company mapping is\nlistIntegrationEntityConnections.",
        "operationId": "getIntegration",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Integration id (see listIntegrations).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Integrations/{integrationId}/entityConnections": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "Lists the stored mapping rows of one integration for one entity type (entityType is required; only\nCompany is supported today).\nWhen to use: resolving a company from listCompanies to its record id in the integrated system (for\nConnectWise, the integer company id), or the other way round.\nNot here: nothing is read from the integrated system and nothing is changed; mapping is done in the\napplication.",
        "description": "Lists the stored mapping rows of one integration for one entity type (entityType is required; only\nCompany is supported today).\nWhen to use: resolving a company from listCompanies to its record id in the integrated system (for\nConnectWise, the integer company id), or the other way round.\nNot here: nothing is read from the integrated system and nothing is changed; mapping is done in the\napplication.",
        "operationId": "listIntegrationEntityConnections",
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "description": "Integration id (see listIntegrations).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "EntityType",
            "in": "query",
            "description": "Required. Entity type of the mappings to list. Only Company is supported.",
            "required": true,
            "schema": {
              "enum": [
                "company"
              ],
              "type": "string",
              "description": "Required. Entity type of the mappings to list. Only Company is supported."
            }
          },
          {
            "name": "OurEntityId",
            "in": "query",
            "description": "Return only the rows mapped to the Strategy Overview entity with this id (for entityType=Company, a company id from listCompanies).",
            "schema": {
              "type": "string",
              "description": "Return only the rows mapped to the Strategy Overview entity with this id (for entityType=Company, a company id from listCompanies)."
            }
          },
          {
            "name": "OurEntityIds",
            "in": "query",
            "description": "Return only the rows mapped to any of the Strategy Overview entities with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Return only the rows mapped to any of the Strategy Overview entities with these ids."
            }
          },
          {
            "name": "IntegratedSystemEntityId",
            "in": "query",
            "description": "Return only the rows of the integrated-system record with this id (for a ConnectWise company, the integer company id).",
            "schema": {
              "type": "string",
              "description": "Return only the rows of the integrated-system record with this id (for a ConnectWise company, the integer company id)."
            }
          },
          {
            "name": "IntegratedSystemEntityIds",
            "in": "query",
            "description": "Return only the rows of any of the integrated-system records with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Return only the rows of any of the integrated-system records with these ids."
            }
          },
          {
            "name": "Status",
            "in": "query",
            "description": "Rows with this stored connection status.",
            "schema": {
              "enum": [
                "linked",
                "mapped",
                "unMapped",
                "synced",
                "ourEntityWhereDeleted",
                "integratedSystemEntityWhereDeleted",
                "orphan",
                "wasMapped"
              ],
              "type": "string",
              "description": "Rows with this stored connection status."
            }
          },
          {
            "name": "Statuses",
            "in": "query",
            "description": "Rows with any of these stored connection statuses.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "linked",
                  "mapped",
                  "unMapped",
                  "synced",
                  "ourEntityWhereDeleted",
                  "integratedSystemEntityWhereDeleted",
                  "orphan",
                  "wasMapped"
                ],
                "type": "string"
              },
              "description": "Rows with any of these stored connection statuses."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for integration entity connections. Allowed values: OurEntityId,\nIntegratedSystemEntityId, LastSyncDate.",
            "schema": {
              "enum": [
                "ourEntityId",
                "integratedSystemEntityId",
                "lastSyncDate"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for integration entity connections. Allowed values: OurEntityId,\nIntegratedSystemEntityId, LastSyncDate."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "ourEntityId",
                  "integratedSystemEntityId",
                  "entityType",
                  "status",
                  "lastSyncDate"
                ],
                "type": "string",
                "description": "Selectable response fields of an integration entity connection (used by the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationEntityConnectionResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "Lists the plans visible to the caller (tenant scope + the caller's plan-permission rules),\nwith typed filters, sorting, paging and field selection.\nWhen to use: the entry point for a planId. companyId comes from listCompanies, ownerId from\nlistUsers (a string GUID), templateId from listPlanTemplates. goalId (from listGoals) finds the\nplans linked to that goal AS A WHOLE, and view=Full carries each plan's goals; a goal linked only\nto a plan item is matched by listPlanItems' goalId instead.\nNext: getPlan for one plan, listPlanParts for the partId that listPlanColumns and listPlanItems\ntake.\nNot here: the plan attached to a report part — getReportPlan returns that one from reportId +\npartId, resolving access through the part rather than through this list.",
        "description": "Lists the plans visible to the caller (tenant scope + the caller's plan-permission rules),\nwith typed filters, sorting, paging and field selection.\nWhen to use: the entry point for a planId. companyId comes from listCompanies, ownerId from\nlistUsers (a string GUID), templateId from listPlanTemplates. goalId (from listGoals) finds the\nplans linked to that goal AS A WHOLE, and view=Full carries each plan's goals; a goal linked only\nto a plan item is matched by listPlanItems' goalId instead.\nNext: getPlan for one plan, listPlanParts for the partId that listPlanColumns and listPlanItems\ntake.\nNot here: the plan attached to a report part — getReportPlan returns that one from reportId +\npartId, resolving access through the part rather than through this list.",
        "operationId": "listPlans",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Plans whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Plans whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Plans whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Plans whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Plans whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Plans whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Plans whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Plans whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the plan with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the plan with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the plans with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the plans with these ids."
            }
          },
          {
            "name": "CompanyId",
            "in": "query",
            "description": "Plans belonging to the company with this id (see listCompanies).",
            "schema": {
              "type": "integer",
              "description": "Plans belonging to the company with this id (see listCompanies).",
              "format": "int32"
            }
          },
          {
            "name": "CompanyIdIn",
            "in": "query",
            "description": "Plans belonging to any of the companies with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Plans belonging to any of the companies with these ids."
            }
          },
          {
            "name": "OwnerId",
            "in": "query",
            "description": "Plans owned by the user with this id (a string GUID; see getUser).",
            "schema": {
              "type": "string",
              "description": "Plans owned by the user with this id (a string GUID; see getUser)."
            }
          },
          {
            "name": "OwnerIdIn",
            "in": "query",
            "description": "Plans owned by any of the users with these ids (string GUIDs).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Plans owned by any of the users with these ids (string GUIDs)."
            }
          },
          {
            "name": "TemplateId",
            "in": "query",
            "description": "Plans created from the plan template with this id (the id of a plan's template object).",
            "schema": {
              "type": "integer",
              "description": "Plans created from the plan template with this id (the id of a plan's template object).",
              "format": "int32"
            }
          },
          {
            "name": "TemplateIdIn",
            "in": "query",
            "description": "Plans created from any of the plan templates with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Plans created from any of the plan templates with these ids."
            }
          },
          {
            "name": "StatusEnum",
            "in": "query",
            "description": "Plans with this lifecycle status.",
            "schema": {
              "enum": [
                "active",
                "completed"
              ],
              "type": "string",
              "description": "Plans with this lifecycle status."
            }
          },
          {
            "name": "GoalId",
            "in": "query",
            "description": "Plans linked as a whole to the goal with this id (see listGoals); a goal linked only to one of a plan's items does not count. Only goals you can see count.",
            "schema": {
              "type": "integer",
              "description": "Plans linked as a whole to the goal with this id (see listGoals); a goal linked only to one of a plan's items does not count. Only goals you can see count.",
              "format": "int32"
            }
          },
          {
            "name": "GoalIdIn",
            "in": "query",
            "description": "Plans linked as a whole to any of the goals with these ids (see listGoals).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Plans linked as a whole to any of the goals with these ids (see listGoals)."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for plans. Allowed values: Name, Id. Only these two: the plan list\nSortOrder is per-user UI state, never an external sort key.",
            "schema": {
              "enum": [
                "name",
                "id"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for plans. Allowed values: Name, Id. Only these two: the plan list\nSortOrder is per-user UI state, never an external sort key."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "statusEnum",
                  "icon",
                  "color",
                  "company",
                  "template",
                  "owner",
                  "goals"
                ],
                "type": "string",
                "description": "Selectable response fields of a plan (used by the fields query parameter). SortOrder is\ndeliberately absent: it is per-user UI state, not an intrinsic plan field, so it is neither\nselectable nor sortable externally."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Creates a plan for a company and returns it; name and companyId are required. With no templateId the\nplan is blank yet seeded with the default part scaffolding; with one, that template's parts, columns\nand items are copied.\nWhen to use: to start a new plan; companyId comes from listCompanies. A company you cannot see or an\nunknown templateId is not found; nothing is written.\nWho sees it: you, its owner, and the company's Managers. An API user owns no plan: one it creates is\nreached through its role's access; widen that with addPlanUsers.\nAn Idempotency-Key makes a retry replay the first response, not create a second plan.\nNext: listPlanParts for the partId listPlanColumns and listPlanItems take; patchPlan edits the plan's\nown fields; deletePlan moves it to the internal trash.\nNot here: assignees or position (it goes first); a template — createPlanTemplate creates one. A\ncreate refused by your subscription's plan limit is 400 and writes nothing.",
        "description": "Creates a plan for a company and returns it; name and companyId are required. With no templateId the\nplan is blank yet seeded with the default part scaffolding; with one, that template's parts, columns\nand items are copied.\nWhen to use: to start a new plan; companyId comes from listCompanies. A company you cannot see or an\nunknown templateId is not found; nothing is written.\nWho sees it: you, its owner, and the company's Managers. An API user owns no plan: one it creates is\nreached through its role's access; widen that with addPlanUsers.\nAn Idempotency-Key makes a retry replay the first response, not create a second plan.\nNext: listPlanParts for the partId listPlanColumns and listPlanItems take; patchPlan edits the plan's\nown fields; deletePlan moves it to the internal trash.\nNot here: assignees or position (it goes first); a template — createPlanTemplate creates one. A\ncreate refused by your subscription's plan limit is 400 and writes nothing.",
        "operationId": "createPlan",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "Returns one plan visible to the caller by id (all public fields). A plan you cannot see is\nreported as not found.\nNext: listPlanParts for this plan's parts, whose partId listPlanColumns and listPlanItems take.\nNot here: the plan attached to a report part — getReportPlan reads that one through reportId +\npartId, so a plan id reachable here is not guaranteed to be reachable there, or the other way\nround.",
        "description": "Returns one plan visible to the caller by id (all public fields). A plan you cannot see is\nreported as not found.\nNext: listPlanParts for this plan's parts, whose partId listPlanColumns and listPlanItems take.\nNot here: the plan attached to a report part — getReportPlan reads that one through reportId +\npartId, so a plan id reachable here is not guaranteed to be reachable there, or the other way\nround.",
        "operationId": "getPlan",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Plans"
        ],
        "summary": "Applies a JSON Patch document to a plan you can access and returns the updated plan.\nWhen to use: to edit the plan's own fields — /name, /icon, /color, /statusEnum. The document is\nvalidated as a whole first: one unknown path rejects the request and writes nothing, /companyId\nincluded, so a plan cannot be moved to another company here.\n/statusEnum takes active or completed and flips both ways; completion is a FLAG only — nothing is\narchived, frozen or recalculated by it.\nClearing differs per path: remove (or an explicit null) works on /color alone, and is 400 on /name,\n/icon and /statusEnum, where the internal update would silently keep the stored value instead. Send\n\"\" to blank /icon.\nNext: getPlan re-reads the same plan; listPlanParts reads its structure.\nNot here: the plan's parts, columns and items — patchPlanItem writes an item — and its company.\nThe owner is updatePlanOwner and per-user access is addPlanUsers.",
        "description": "Applies a JSON Patch document to a plan you can access and returns the updated plan.\nWhen to use: to edit the plan's own fields — /name, /icon, /color, /statusEnum. The document is\nvalidated as a whole first: one unknown path rejects the request and writes nothing, /companyId\nincluded, so a plan cannot be moved to another company here.\n/statusEnum takes active or completed and flips both ways; completion is a FLAG only — nothing is\narchived, frozen or recalculated by it.\nClearing differs per path: remove (or an explicit null) works on /color alone, and is 400 on /name,\n/icon and /statusEnum, where the internal update would silently keep the stored value instead. Send\n\"\" to blank /icon.\nNext: getPlan re-reads the same plan; listPlanParts reads its structure.\nNot here: the plan's parts, columns and items — patchPlanItem writes an item — and its company.\nThe owner is updatePlanOwner and per-user access is addPlanUsers.",
        "operationId": "patchPlan",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Plans"
        ],
        "summary": "Deletes a plan and returns no content. This is a SOFT delete: the plan moves to the internal trash —\nit disappears from listPlans and getPlan reports it as not found, its parts, columns, items and\nvalues are all kept, and it stays restorable.\nWhen to use: to retire a plan. It is reversible — listDeletedPlans reads your trash and restorePlan\nbrings a plan back with everything it had. Permanent delete is NOT available externally.\nNext: listDeletedPlans lists the plan; restorePlan undoes this. A second delete of the same id\nreports not found, as does getPlan. A report that pinned this plan keeps its copy — the delete does\nnot touch it and is never refused because of it.\nNot here: deleting a plan template, deleting a part,\nand emptying the trash.",
        "description": "Deletes a plan and returns no content. This is a SOFT delete: the plan moves to the internal trash —\nit disappears from listPlans and getPlan reports it as not found, its parts, columns, items and\nvalues are all kept, and it stays restorable.\nWhen to use: to retire a plan. It is reversible — listDeletedPlans reads your trash and restorePlan\nbrings a plan back with everything it had. Permanent delete is NOT available externally.\nNext: listDeletedPlans lists the plan; restorePlan undoes this. A second delete of the same id\nreports not found, as does getPlan. A report that pinned this plan keeps its copy — the delete does\nnot touch it and is never refused because of it.\nNot here: deleting a plan template, deleting a part,\nand emptying the trash.",
        "operationId": "deletePlan",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/parts": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "Lists the parts (sections) of a plan the caller can access.\nNext: returns the partId taken by listPlanColumns, listPlanItems, getPlanItem and patchPlanItem.\nNot here: the parts of the plan attached to a report part — listReportPlanParts lists those,\nresolving access through the report part and serving a completed or archived report from its\narchive snapshot.",
        "description": "Lists the parts (sections) of a plan the caller can access.\nNext: returns the partId taken by listPlanColumns, listPlanItems, getPlanItem and patchPlanItem.\nNot here: the parts of the plan attached to a report part — listReportPlanParts lists those,\nresolving access through the report part and serving a completed or archived report from its\narchive snapshot.",
        "operationId": "listPlanParts",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanPartResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/parts/{partId}/columns": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "Lists the columns of a plan part the caller can access.\nWhen to use: to learn the shape of a part's rows before reading them with listPlanItems, and to\nlearn which columns an item's values may be written to — each column carries isEditable and the\npatchPath that will write it. The partId is the one listPlanParts returns.\nA dropdown-backed column such as Status also carries options, its allowed values as id + label:\nan item's value in that column IS one of those ids, never the label.\nNext: listPlanItems for the rows; match a column's id against an item's columns[].columnId.\nNot here: the columns of the plan attached to a report part — listReportPlanColumns reads those\nthrough reportId + partId + planPartId.",
        "description": "Lists the columns of a plan part the caller can access.\nWhen to use: to learn the shape of a part's rows before reading them with listPlanItems, and to\nlearn which columns an item's values may be written to — each column carries isEditable and the\npatchPath that will write it. The partId is the one listPlanParts returns.\nA dropdown-backed column such as Status also carries options, its allowed values as id + label:\nan item's value in that column IS one of those ids, never the label.\nNext: listPlanItems for the rows; match a column's id against an item's columns[].columnId.\nNot here: the columns of the plan attached to a report part — listReportPlanColumns reads those\nthrough reportId + partId + planPartId.",
        "operationId": "listPlanColumns",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanColumnResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Creates a column in a plan part and returns it. label and typeEnum are required.\nWhen to use: to add a field to a plan's rows. A part holds at most one column of each type except\ncustomAppField, so a second column of a type it already has is 400 — and a blank plan's part already\nhas all of them.\nA dropdown-backed column — typeEnum status, or customTypeEnum singleSelectDropDown — REQUIRES options,\nwhose ids the server mints (sending an id is 400): read them off the echo. An isDefault option is\nstamped on every item of the part that already holds any value.\nSend an Idempotency-Key so a retry replays the first response instead of creating a second column.\nNext: patchPlanColumn edits /label, /description, /sortOrder and /options;\npatchPlanItem writes an item's value through the echoed patchPath.\nNot here: choosing the position (the column is appended), the UI style and display settings, and a plan\ntemplate's columns (createPlanTemplateColumn).",
        "description": "Creates a column in a plan part and returns it. label and typeEnum are required.\nWhen to use: to add a field to a plan's rows. A part holds at most one column of each type except\ncustomAppField, so a second column of a type it already has is 400 — and a blank plan's part already\nhas all of them.\nA dropdown-backed column — typeEnum status, or customTypeEnum singleSelectDropDown — REQUIRES options,\nwhose ids the server mints (sending an id is 400): read them off the echo. An isDefault option is\nstamped on every item of the part that already holds any value.\nSend an Idempotency-Key so a retry replays the first response instead of creating a second column.\nNext: patchPlanColumn edits /label, /description, /sortOrder and /options;\npatchPlanItem writes an item's value through the echoed patchPath.\nNot here: choosing the position (the column is appended), the UI style and display settings, and a plan\ntemplate's columns (createPlanTemplateColumn).",
        "operationId": "createPlanColumn",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanColumnInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanColumnResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/parts/{partId}/items": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "Lists the items of a plan part the caller can access, in the part's own order. A partId of another\nplan is reported as not found.\nEvery row carries its stored values as columns[{columnId, values}]. An item has no name field: its\nname is its value in the part's Name-type column, and a column it holds no value in is absent.\nThe rows are a TREE: parentId is null on a root item and otherwise the id of another row of this\npart. parentId/parentIdIn filter to one item's children. goalId (from listGoals) matches DIRECT item\nlinks only; listPlans?goalId finds the whole plan.\nWhen to use: items need a partId from listPlanParts. view=Full is the default; view=Summary drops\ndescription (unbounded); descriptionLength is in both views.\nNext: returns the itemId taken by getPlanItem, patchPlanItem, copyPlanItem and patchPlanItems;\nmatch columns[].columnId against listPlanColumns.\nNot here: the items of the plan attached to a report part — listReportPlanItems reads those.",
        "description": "Lists the items of a plan part the caller can access, in the part's own order. A partId of another\nplan is reported as not found.\nEvery row carries its stored values as columns[{columnId, values}]. An item has no name field: its\nname is its value in the part's Name-type column, and a column it holds no value in is absent.\nThe rows are a TREE: parentId is null on a root item and otherwise the id of another row of this\npart. parentId/parentIdIn filter to one item's children. goalId (from listGoals) matches DIRECT item\nlinks only; listPlans?goalId finds the whole plan.\nWhen to use: items need a partId from listPlanParts. view=Full is the default; view=Summary drops\ndescription (unbounded); descriptionLength is in both views.\nNext: returns the itemId taken by getPlanItem, patchPlanItem, copyPlanItem and patchPlanItems;\nmatch columns[].columnId against listPlanColumns.\nNot here: the items of the plan attached to a report part — listReportPlanItems reads those.",
        "operationId": "listPlanItems",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "GoalId",
            "in": "query",
            "description": "Items linked directly to the goal with this id (see listGoals). An item included only through its plan's link does not match; listPlans with goalId finds the whole plan. Only goals you can see count.",
            "schema": {
              "type": "integer",
              "description": "Items linked directly to the goal with this id (see listGoals). An item included only through its plan's link does not match; listPlans with goalId finds the whole plan. Only goals you can see count.",
              "format": "int32"
            }
          },
          {
            "name": "GoalIdIn",
            "in": "query",
            "description": "Items linked directly to any of the goals with these ids (see listGoals).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items linked directly to any of the goals with these ids (see listGoals)."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the item with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the item with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the items with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items with these ids."
            }
          },
          {
            "name": "ParentId",
            "in": "query",
            "description": "Items nested directly under the item with this id.",
            "schema": {
              "type": "integer",
              "description": "Items nested directly under the item with this id.",
              "format": "int32"
            }
          },
          {
            "name": "ParentIdIn",
            "in": "query",
            "description": "Items nested directly under any of the items with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items nested directly under any of the items with these ids."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Full by default, which is the opposite of every other list on this surface. That is deliberate:\nthese two lists shipped with the description in the row, and the contract is additive inside v1, so\ndefaulting to Summary would silently remove a field from every existing caller's response.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Creates an item in a plan part and returns it. Every body field is optional: {} creates an active\nitem at the end of the part.\nWhen to use: to add a row to a plan. An item has no name field — its displayed name is its value in\nthe part's Name-type column, so send it through columns, keyed by the columnId listPlanColumns\nreturns. Only a column whose isEditable is true may be named: a read-only column of the part is 400\nand a column of another part is 404, and nothing is written either way.\nSend an Idempotency-Key so a retry replays the first response instead of creating a second item.\nNext: patchPlanItem sets /description or moves the row with /sortOrder.\nNot here: creating a group or a mid-item (this creates Item-type rows only) and choosing a sort\norder (the item is appended); and createReportPlanItem, which creates the same kind of row inside the\nplan attached to a report part, resolving plan access through the report part rather than directly.",
        "description": "Creates an item in a plan part and returns it. Every body field is optional: {} creates an active\nitem at the end of the part.\nWhen to use: to add a row to a plan. An item has no name field — its displayed name is its value in\nthe part's Name-type column, so send it through columns, keyed by the columnId listPlanColumns\nreturns. Only a column whose isEditable is true may be named: a read-only column of the part is 400\nand a column of another part is 404, and nothing is written either way.\nSend an Idempotency-Key so a retry replays the first response instead of creating a second item.\nNext: patchPlanItem sets /description or moves the row with /sortOrder.\nNot here: creating a group or a mid-item (this creates Item-type rows only) and choosing a sort\norder (the item is appended); and createReportPlanItem, which creates the same kind of row inside the\nplan attached to a report part, resolving plan access through the report part rather than directly.",
        "operationId": "createPlanItem",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Plans"
        ],
        "summary": "Writes the SAME column values into several items of one plan part and returns a per-item outcome.\nThe body is {itemIds, patch}: itemIds is required and non-empty (an empty list is 400, never \"all\nitems\"), and patch is a JSON Patch naming /columns/{columnId} ONLY.\nWhen to use: to set one field across many rows in one call. The scalar paths patchPlanItem accepts\nare NOT bulk-writable — /isActive, /sortOrder, /parentId and /description are 400 here, as is a\ncolumn of this part that is not editable; a column of another part is not found. The document is\nvalidated before the first write, so a bad request changes no item at all.\nThe answer is a PARTIAL SUCCESS: 200 with items[] (the rows written, in full shape) and\nerrors[{id, code, message}] — 200 even when every id failed. An id that is not an item of this part\ncomes back as a notFound entry while the others still update.\nNext: getPlanItem or listPlanItems re-reads the result.\nNot here: deleting or moving many items.",
        "description": "Writes the SAME column values into several items of one plan part and returns a per-item outcome.\nThe body is {itemIds, patch}: itemIds is required and non-empty (an empty list is 400, never \"all\nitems\"), and patch is a JSON Patch naming /columns/{columnId} ONLY.\nWhen to use: to set one field across many rows in one call. The scalar paths patchPlanItem accepts\nare NOT bulk-writable — /isActive, /sortOrder, /parentId and /description are 400 here, as is a\ncolumn of this part that is not editable; a column of another part is not found. The document is\nvalidated before the first write, so a bad request changes no item at all.\nThe answer is a PARTIAL SUCCESS: 200 with items[] (the rows written, in full shape) and\nerrors[{id, code, message}] — 200 even when every id failed. An id that is not an item of this part\ncomes back as a notFound entry while the others still update.\nNext: getPlanItem or listPlanItems re-reads the result.\nNot here: deleting or moving many items.",
        "operationId": "patchPlanItems",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanItemsBulkPatchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemsBulkPatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/parts/{partId}/items/{itemId}": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "Returns one item of a plan part the caller can access. An item that is not part of the given part\nand plan is reported as not found.\nThe item carries its stored values as columns[{columnId, values}]. There is no name field: the\ndisplayed name is the value in the part's Name-type column, and a column it holds no value in is\nabsent. parentId is the id of the item this one is nested under, or null for a root item; this read\nis always the Full shape, so description and descriptionLength are both present.\nNext: patchPlanItem to change /isActive, /isCollapsed, /sortOrder, /parentId, /description or a\ncolumn's values; copyPlanItem to duplicate it; listPlanColumns to\nresolve a columnId.\nNot here: getReportPlanItem reads the same item inside the plan attached to a report part,\nresolving plan access through the report part rather than directly; the two scopes are never\ninterchangeable.",
        "description": "Returns one item of a plan part the caller can access. An item that is not part of the given part\nand plan is reported as not found.\nThe item carries its stored values as columns[{columnId, values}]. There is no name field: the\ndisplayed name is the value in the part's Name-type column, and a column it holds no value in is\nabsent. parentId is the id of the item this one is nested under, or null for a root item; this read\nis always the Full shape, so description and descriptionLength are both present.\nNext: patchPlanItem to change /isActive, /isCollapsed, /sortOrder, /parentId, /description or a\ncolumn's values; copyPlanItem to duplicate it; listPlanColumns to\nresolve a columnId.\nNot here: getReportPlanItem reads the same item inside the plan attached to a report part,\nresolving plan access through the report part rather than directly; the two scopes are never\ninterchangeable.",
        "operationId": "getPlanItem",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Plans"
        ],
        "summary": "Applies a JSON Patch to a plan item and returns it. Patchable: /isActive, /isCollapsed, /sortOrder,\n/description, /parentId, plus /columns/{columnId}. Any other path (for example /typeEnum) is 400,\nand the document is validated whole first, so one bad operation writes nothing.\nOnly a column whose isEditable is true on listPlanColumns may be named (its patchPath is the exact\npath); a column of another part is not found.\n/parentId moves the item in its part's tree: the new parent must be another item of the SAME part\n(a foreign id is not found), and the item's own id or one nested under it is 400. The move is\nPOSITIONAL — the item lands LAST among the new parent's children — and combining it with /sortOrder\nis legal: the move applies first, then /sortOrder verbatim.\nremove writes the default: false, 0 for /sortOrder, null for /description and /parentId; on\n/columns/{columnId} it clears the column.\nNot here: writing many items at once — patchPlanItems does that, columns only.",
        "description": "Applies a JSON Patch to a plan item and returns it. Patchable: /isActive, /isCollapsed, /sortOrder,\n/description, /parentId, plus /columns/{columnId}. Any other path (for example /typeEnum) is 400,\nand the document is validated whole first, so one bad operation writes nothing.\nOnly a column whose isEditable is true on listPlanColumns may be named (its patchPath is the exact\npath); a column of another part is not found.\n/parentId moves the item in its part's tree: the new parent must be another item of the SAME part\n(a foreign id is not found), and the item's own id or one nested under it is 400. The move is\nPOSITIONAL — the item lands LAST among the new parent's children — and combining it with /sortOrder\nis legal: the move applies first, then /sortOrder verbatim.\nremove writes the default: false, 0 for /sortOrder, null for /description and /parentId; on\n/columns/{columnId} it clears the column.\nNot here: writing many items at once — patchPlanItems does that, columns only.",
        "operationId": "patchPlanItem",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/deleted": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "Lists the plans you deleted that are still in the internal trash, one page at a time.\nWhen to use: after a deletePlan you want to undo — this is the only place a trashed plan is\nvisible, since listPlans drops it and getPlan reports it as not found. Rows carry the plan in the\nlistPlans Summary shape plus deletedAt and deletedBy, most recently deleted first.\nFilters: id/ids, companyId/companyIdIn, ownerId/ownerIdIn, templateId/templateIdIn.\nNext: restorePlan brings a row back with the plan.id read here, after which getPlan and listPlans\nreturn it again.\nNot here: emptying the trash — permanent delete is not exposed by this API — and the trash of plan\ntemplates, reports or plan items, none of which have one.",
        "description": "Lists the plans you deleted that are still in the internal trash, one page at a time.\nWhen to use: after a deletePlan you want to undo — this is the only place a trashed plan is\nvisible, since listPlans drops it and getPlan reports it as not found. Rows carry the plan in the\nlistPlans Summary shape plus deletedAt and deletedBy, most recently deleted first.\nFilters: id/ids, companyId/companyIdIn, ownerId/ownerIdIn, templateId/templateIdIn.\nNext: restorePlan brings a row back with the plan.id read here, after which getPlan and listPlans\nreturn it again.\nNot here: emptying the trash — permanent delete is not exposed by this API — and the trash of plan\ntemplates, reports or plan items, none of which have one.",
        "operationId": "listDeletedPlans",
        "parameters": [
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the trashed plan with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the trashed plan with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the trashed plans with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the trashed plans with these ids."
            }
          },
          {
            "name": "CompanyId",
            "in": "query",
            "description": "Trashed plans belonging to the company with this id (see listCompanies).",
            "schema": {
              "type": "integer",
              "description": "Trashed plans belonging to the company with this id (see listCompanies).",
              "format": "int32"
            }
          },
          {
            "name": "CompanyIdIn",
            "in": "query",
            "description": "Trashed plans belonging to any of the companies with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Trashed plans belonging to any of the companies with these ids."
            }
          },
          {
            "name": "OwnerId",
            "in": "query",
            "description": "Trashed plans owned by the user with this id (a string GUID; see getUser).",
            "schema": {
              "type": "string",
              "description": "Trashed plans owned by the user with this id (a string GUID; see getUser)."
            }
          },
          {
            "name": "OwnerIdIn",
            "in": "query",
            "description": "Trashed plans owned by any of the users with these ids (string GUIDs).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Trashed plans owned by any of the users with these ids (string GUIDs)."
            }
          },
          {
            "name": "TemplateId",
            "in": "query",
            "description": "Trashed plans created from the plan template with this id.",
            "schema": {
              "type": "integer",
              "description": "Trashed plans created from the plan template with this id.",
              "format": "int32"
            }
          },
          {
            "name": "TemplateIdIn",
            "in": "query",
            "description": "Trashed plans created from any of the plan templates with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Trashed plans created from any of the plan templates with these ids."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedPlanResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/restore": {
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Restores a plan from the internal trash and returns it, exactly as getPlan reads it back.\nWhen to use: to undo a deletePlan. The planId comes from listDeletedPlans; a plan that is not in\nYOUR trash — a live plan, an unknown id, or another tenant's trashed plan — is not found, and\nnothing is written. The restored plan keeps its original parts, columns, items, values and\nper-user permissions: everyone who could open it before can open it again.\nSend an Idempotency-Key so a retry replays the first response.\nNext: getPlan and listPlans return the plan again; listDeletedPlans no longer does.\nNot here: permanent delete, which this API does not expose at all, and restoring a plan template,\na report or a plan item — deleting any of those is already permanent.",
        "description": "Restores a plan from the internal trash and returns it, exactly as getPlan reads it back.\nWhen to use: to undo a deletePlan. The planId comes from listDeletedPlans; a plan that is not in\nYOUR trash — a live plan, an unknown id, or another tenant's trashed plan — is not found, and\nnothing is written. The restored plan keeps its original parts, columns, items, values and\nper-user permissions: everyone who could open it before can open it again.\nSend an Idempotency-Key so a retry replays the first response.\nNext: getPlan and listPlans return the plan again; listDeletedPlans no longer does.\nNot here: permanent delete, which this API does not expose at all, and restoring a plan template,\na report or a plan item — deleting any of those is already permanent.",
        "operationId": "restorePlan",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/parts/{partId}/items/{itemId}/copy": {
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Duplicates one item of a plan part and returns the copy. No body.\nWhen to use: to add a row that starts out identical to an existing one — the copy carries the\nsource's values in every column, so it is cheaper and safer than re-sending them on createPlanItem.\nWhat is copied: the item itself, its column values and its image links. The items nested UNDER it\nare NOT copied — copy them one by one and reparent them with patchPlanItem /parentId. The copy\nkeeps the source's parent and lands directly after the source among its siblings.\nSend an Idempotency-Key so a retry replays the first response instead of creating a second copy.\nNext: patchPlanItem edits the copy (its id is in the response).\nNot here: copying a whole part or a plan (createPlan from a templateId does that), copying an item\ninto a DIFFERENT part or plan, and copying an item of the plan attached to a report part.",
        "description": "Duplicates one item of a plan part and returns the copy. No body.\nWhen to use: to add a row that starts out identical to an existing one — the copy carries the\nsource's values in every column, so it is cheaper and safer than re-sending them on createPlanItem.\nWhat is copied: the item itself, its column values and its image links. The items nested UNDER it\nare NOT copied — copy them one by one and reparent them with patchPlanItem /parentId. The copy\nkeeps the source's parent and lands directly after the source among its siblings.\nSend an Idempotency-Key so a retry replays the first response instead of creating a second copy.\nNext: patchPlanItem edits the copy (its id is in the response).\nNot here: copying a whole part or a plan (createPlan from a templateId does that), copying an item\ninto a DIFFERENT part or plan, and copying an item of the plan attached to a report part.",
        "operationId": "copyPlanItem",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/parts/{partId}/insert-template-items": {
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Copies the items of one part of a plan TEMPLATE into a part of a plan and returns the created items.\ntemplateId and templatePartId are required; parentId is optional.\nThe copies keep the template's own nesting among themselves, attached under parentId or at the root\nof the part when omitted; they are appended last. Values travel per column MATCH (same type, label\nand custom type), and a dropdown value the plan's column lacks is ADDED to its options.\nA template you cannot see, a part of another template, a part with no items and a parentId outside\nthis part are each refused, writing nothing.\nWhen to use: to fill a plan part from a template.\nSend an Idempotency-Key so a retry replays instead of inserting twice.\nNext: listPlanItems shows them in place.\nNot here: choosing the position, and copying a template part or column.",
        "description": "Copies the items of one part of a plan TEMPLATE into a part of a plan and returns the created items.\ntemplateId and templatePartId are required; parentId is optional.\nThe copies keep the template's own nesting among themselves, attached under parentId or at the root\nof the part when omitted; they are appended last. Values travel per column MATCH (same type, label\nand custom type), and a dropdown value the plan's column lacks is ADDED to its options.\nA template you cannot see, a part of another template, a part with no items and a parentId outside\nthis part are each refused, writing nothing.\nWhen to use: to fill a plan part from a template.\nSend an Idempotency-Key so a retry replays instead of inserting twice.\nNext: listPlanItems shows them in place.\nNot here: choosing the position, and copying a template part or column.",
        "operationId": "insertPlanTemplateItems",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanTemplateItemsInsertInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/parts/{partId}/columns/{columnId}": {
      "patch": {
        "tags": [
          "Plans"
        ],
        "summary": "Applies a JSON Patch to a column of a plan part and returns it.\nWhen to use: to rename a column (/label), describe it (/description), move it (/sortOrder) or change a\ndropdown column's allowed values (/options). The document is validated whole first, so one unknown path\nwrites nothing — /typeEnum, /isActive and /isExcel included.\n/options is a FULL REPLACEMENT list: resend an option's id to keep it, leave it out to drop it, omit the\nid to add one. Each id must be a current option id of the column, used once; otherwise 400. It is 400 on\na column that is not dropdown-backed, and dropping an option does NOT clear the item values holding its\nid — they keep it and stop resolving.\nremove clears /description only, and is 400 on /label, /sortOrder and /options. /sortOrder must be\ngreater than 0 and free in the part.\nNot here: turning a column on or off — updatePlanRecurringColumns does that for the recurring ones —\nand the column's UI style and display settings.",
        "description": "Applies a JSON Patch to a column of a plan part and returns it.\nWhen to use: to rename a column (/label), describe it (/description), move it (/sortOrder) or change a\ndropdown column's allowed values (/options). The document is validated whole first, so one unknown path\nwrites nothing — /typeEnum, /isActive and /isExcel included.\n/options is a FULL REPLACEMENT list: resend an option's id to keep it, leave it out to drop it, omit the\nid to add one. Each id must be a current option id of the column, used once; otherwise 400. It is 400 on\na column that is not dropdown-backed, and dropping an option does NOT clear the item values holding its\nid — they keep it and stop resolving.\nremove clears /description only, and is 400 on /label, /sortOrder and /options. /sortOrder must be\ngreater than 0 and free in the part.\nNot here: turning a column on or off — updatePlanRecurringColumns does that for the recurring ones —\nand the column's UI style and display settings.",
        "operationId": "patchPlanColumn",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "columnId",
            "in": "path",
            "description": "Column id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanColumnResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/parts/{partId}/columns/recurring": {
      "put": {
        "tags": [
          "Plans"
        ],
        "summary": "Activates or deactivates EVERY recurring column of a plan part at once and returns the part's columns.\nWhen to use: to show or hide a plan's recurring block — quantity, recurring total, effective,\ncancellation and period. The body is one required flag, isActive; there is no per-column form of this\noperation, and no external operation makes a column recurring.\nDeactivating keeps every item value and drops only the saved filter values on those columns, which is\nwhat makes it reversible. A part with no recurring columns answers\n200 having changed nothing.\nNext: the returned page is what listPlanColumns would read back; patchPlanColumn edits one column's own\nfields.\nNot here: activating a column that is not recurring, and the recurring columns of a plan template —\nupdatePlanTemplateRecurringColumns does those.",
        "description": "Activates or deactivates EVERY recurring column of a plan part at once and returns the part's columns.\nWhen to use: to show or hide a plan's recurring block — quantity, recurring total, effective,\ncancellation and period. The body is one required flag, isActive; there is no per-column form of this\noperation, and no external operation makes a column recurring.\nDeactivating keeps every item value and drops only the saved filter values on those columns, which is\nwhat makes it reversible. A part with no recurring columns answers\n200 having changed nothing.\nNext: the returned page is what listPlanColumns would read back; patchPlanColumn edits one column's own\nfields.\nNot here: activating a column that is not recurring, and the recurring columns of a plan template —\nupdatePlanTemplateRecurringColumns does those.",
        "operationId": "updatePlanRecurringColumns",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanRecurringColumnsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanColumnResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/users": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "Returns the users who have access to a plan you can access, one page at a time.\nWhen to use: to see who can open a plan and at what level, and to get the userId removePlanUser and\nupdatePlanUsersAccessLevel take. Rows are ordered by name and carry id, firstName, lastName,\naccessLevel and isOwner — no email and no tenant role; getUser reads a user's own fields.\naccessLevel is what the user can do on THIS plan, so an Admin always reads fullAccess whatever is\nstored for them. At most one row has isOwner true — the owner can be absent from this listing;\ngetPlan.owner is authoritative.\nNext: listPlanAvailableUsers lists who could be added; addPlanUsers grants access;\nupdatePlanUsersAccessLevel changes a level; updatePlanOwner hands the plan over.\nNot here: the caller's own effective permissions, and the users of a plan template or a report.",
        "description": "Returns the users who have access to a plan you can access, one page at a time.\nWhen to use: to see who can open a plan and at what level, and to get the userId removePlanUser and\nupdatePlanUsersAccessLevel take. Rows are ordered by name and carry id, firstName, lastName,\naccessLevel and isOwner — no email and no tenant role; getUser reads a user's own fields.\naccessLevel is what the user can do on THIS plan, so an Admin always reads fullAccess whatever is\nstored for them. At most one row has isOwner true — the owner can be absent from this listing;\ngetPlan.owner is authoritative.\nNext: listPlanAvailableUsers lists who could be added; addPlanUsers grants access;\nupdatePlanUsersAccessLevel changes a level; updatePlanOwner hands the plan over.\nNot here: the caller's own effective permissions, and the users of a plan template or a report.",
        "operationId": "listPlanUsers",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the user with this id.",
            "schema": {
              "type": "string",
              "description": "Return only the user with this id."
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the users with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Return only the users with these ids."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanUserResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "Gives one or more users access to a plan and returns the plan's users, exactly as listPlanUsers\nreads them back.\nWhen to use: after createPlan, which reaches only you and the company's Managers. userIds come from\nlistPlanAvailableUsers; an id it does not return — another tenant's user, or one the plan's company\ndoes not reach — is not found and NOTHING is written, rather than being silently dropped.\nEach added user starts at the level their role gives them; updatePlanUsersAccessLevel changes it.\nAn id already on the plan is accepted and left untouched, so a repeated call is safe.\nSend an Idempotency-Key so a retry replays the first response.\nNext: updatePlanUsersAccessLevel sets a level; removePlanUser takes access away; updatePlanOwner\nhands the plan over.\nNot here: creating a user, and giving access to anyone outside the tenant.",
        "description": "Gives one or more users access to a plan and returns the plan's users, exactly as listPlanUsers\nreads them back.\nWhen to use: after createPlan, which reaches only you and the company's Managers. userIds come from\nlistPlanAvailableUsers; an id it does not return — another tenant's user, or one the plan's company\ndoes not reach — is not found and NOTHING is written, rather than being silently dropped.\nEach added user starts at the level their role gives them; updatePlanUsersAccessLevel changes it.\nAn id already on the plan is accepted and left untouched, so a repeated call is safe.\nSend an Idempotency-Key so a retry replays the first response.\nNext: updatePlanUsersAccessLevel sets a level; removePlanUser takes access away; updatePlanOwner\nhands the plan over.\nNot here: creating a user, and giving access to anyone outside the tenant.",
        "operationId": "addPlanUsers",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanUsersAddInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanUserResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/available-users": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "Returns the users who COULD be given access to a plan you can access, one page at a time.\nWhen to use: as the id producer for addPlanUsers — an id this does not return is refused there as\nnot found. It lists the tenant's users the plan's company reaches, plus every Admin, whether or not\nthey are on the plan already.\nRows are the listPlanUsers shape, so accessLevel says what each user can do on the plan TODAY:\nnoAccess for anyone not on it yet, and fullAccess for an Admin, who needs no grant.\nNext: addPlanUsers grants access to the ids read here; listPlanUsers reads who already has it.\nNot here: the tenant's whole user directory — listUsers reads that — and any email or tenant role.",
        "description": "Returns the users who COULD be given access to a plan you can access, one page at a time.\nWhen to use: as the id producer for addPlanUsers — an id this does not return is refused there as\nnot found. It lists the tenant's users the plan's company reaches, plus every Admin, whether or not\nthey are on the plan already.\nRows are the listPlanUsers shape, so accessLevel says what each user can do on the plan TODAY:\nnoAccess for anyone not on it yet, and fullAccess for an Admin, who needs no grant.\nNext: addPlanUsers grants access to the ids read here; listPlanUsers reads who already has it.\nNot here: the tenant's whole user directory — listUsers reads that — and any email or tenant role.",
        "operationId": "listPlanAvailableUsers",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the user with this id.",
            "schema": {
              "type": "string",
              "description": "Return only the user with this id."
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the users with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Return only the users with these ids."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanUserResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/users/{userId}": {
      "delete": {
        "tags": [
          "Plans"
        ],
        "summary": "Removes one user's access to a plan and returns no content.\nWhen to use: to take a plan away from someone. The userId comes from listPlanUsers; a user who is\nnot on the plan is reported as not found, so a second delete of the same id is not found rather\nthan a silent success.\nThree users cannot be removed, and each refusal says which: the plan's OWNER — hand the plan over\nwith updatePlanOwner first — YOURSELF, and any Admin, who reaches every plan by role.\nNext: listPlanUsers no longer returns the user; addPlanUsers puts them back at their role's level.\nNot here: deleting the user account itself, and removing several users at once — call this per id.",
        "description": "Removes one user's access to a plan and returns no content.\nWhen to use: to take a plan away from someone. The userId comes from listPlanUsers; a user who is\nnot on the plan is reported as not found, so a second delete of the same id is not found rather\nthan a silent success.\nThree users cannot be removed, and each refusal says which: the plan's OWNER — hand the plan over\nwith updatePlanOwner first — YOURSELF, and any Admin, who reaches every plan by role.\nNext: listPlanUsers no longer returns the user; addPlanUsers puts them back at their role's level.\nNot here: deleting the user account itself, and removing several users at once — call this per id.",
        "operationId": "removePlanUser",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User id (a string GUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/users/access-level": {
      "put": {
        "tags": [
          "Plans"
        ],
        "summary": "Sets the access level of one or more users of a plan and returns what changed.\nWhen to use: to widen or narrow what someone can do on a plan. Send items of userId and\naccessLevel; the userIds come from listPlanUsers. Users are handled independently — the ones that\nchanged come back in items and the ones that did not in errors, each with a code and a reason —\nbut an invalid body writes nothing at all.\naccessLevel noAccess REMOVES the user from the plan instead of storing a level.\nRefused per user, in errors: the plan's OWNER (use updatePlanOwner), YOURSELF, any Admin, and any\nid that is not a user of this plan.\nThe gate is the per-plan Plan_Users Update permission, not a role rule: Admin passes by role, and\nanyone else — a Manager included — passes only when they hold fullAccess (or another\nUpdate-granting level) on THIS plan, whatever their role.\nNext: listPlanUsers re-reads the result.",
        "description": "Sets the access level of one or more users of a plan and returns what changed.\nWhen to use: to widen or narrow what someone can do on a plan. Send items of userId and\naccessLevel; the userIds come from listPlanUsers. Users are handled independently — the ones that\nchanged come back in items and the ones that did not in errors, each with a code and a reason —\nbut an invalid body writes nothing at all.\naccessLevel noAccess REMOVES the user from the plan instead of storing a level.\nRefused per user, in errors: the plan's OWNER (use updatePlanOwner), YOURSELF, any Admin, and any\nid that is not a user of this plan.\nThe gate is the per-plan Plan_Users Update permission, not a role rule: Admin passes by role, and\nanyone else — a Manager included — passes only when they hold fullAccess (or another\nUpdate-granting level) on THIS plan, whatever their role.\nNext: listPlanUsers re-reads the result.",
        "operationId": "updatePlanUsersAccessLevel",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanUsersAccessLevelInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanUsersAccessLevelResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Plans/{planId}/owner": {
      "put": {
        "tags": [
          "Plans"
        ],
        "summary": "Hands a plan over to another user and returns the plan.\nWhen to use: to change who owns a plan. The userId must be a user of the plan's own tenant; anyone\nelse is not found and nothing is written. Sending the CURRENT owner's id changes nothing and is not\nan error.\nThe new owner is given full access to the plan unless they are an Admin, who already has it; the\nprevious owner drops to the level their role gives them and stays on the plan.\nThe gate is the per-plan Plan_Owner Update permission, not a role rule: Admin passes by role, and\nanyone else — including whoever adds and removes this plan's users — passes only when they hold\nfullAccess on THIS plan.\nNext: getPlan shows the new owner; listPlanUsers shows both users' new levels.\nNot here: moving the plan to another company, and choosing an owner at createPlan.",
        "description": "Hands a plan over to another user and returns the plan.\nWhen to use: to change who owns a plan. The userId must be a user of the plan's own tenant; anyone\nelse is not found and nothing is written. Sending the CURRENT owner's id changes nothing and is not\nan error.\nThe new owner is given full access to the plan unless they are an Admin, who already has it; the\nprevious owner drops to the level their role gives them and stays on the plan.\nThe gate is the per-plan Plan_Owner Update permission, not a role rule: Admin passes by role, and\nanyone else — including whoever adds and removes this plan's users — passes only when they hold\nfullAccess on THIS plan.\nNext: getPlan shows the new owner; listPlanUsers shows both users' new levels.\nNot here: moving the plan to another company, and choosing an owner at createPlan.",
        "operationId": "updatePlanOwner",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "description": "Plan id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanOwnerInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/PlanTemplates": {
      "get": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Lists the plan templates visible to the caller (your client's templates, narrowed by your\ntemplate-permission rules), with typed filters, sorting, paging and field selection.\nWhen to use: the entry point for a templateId — this is where listPlans' templateId filter and\ncreatePlan's templateId both come from.\nA template is a blueprint, not a plan: it holds no\ncompany and no dates, only the parts, columns and default values a new plan is stamped out with.\nNext: getPlanTemplate for one template, listPlanTemplateParts for the partId that\nlistPlanTemplateColumns and listPlanTemplateItems take.\nYour role must grant plan-template read, or this is 403; with the grant but no template\nassignments you get an empty page, not an error.\nNot here: the plans themselves — listPlans returns those, and a plan's template object names the\ntemplate it came from.",
        "description": "Lists the plan templates visible to the caller (your client's templates, narrowed by your\ntemplate-permission rules), with typed filters, sorting, paging and field selection.\nWhen to use: the entry point for a templateId — this is where listPlans' templateId filter and\ncreatePlan's templateId both come from.\nA template is a blueprint, not a plan: it holds no\ncompany and no dates, only the parts, columns and default values a new plan is stamped out with.\nNext: getPlanTemplate for one template, listPlanTemplateParts for the partId that\nlistPlanTemplateColumns and listPlanTemplateItems take.\nYour role must grant plan-template read, or this is 403; with the grant but no template\nassignments you get an empty page, not an error.\nNot here: the plans themselves — listPlans returns those, and a plan's template object names the\ntemplate it came from.",
        "operationId": "listPlanTemplates",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Plan templates whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Plan templates whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Plan templates whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Plan templates whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Plan templates whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Plan templates whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Plan templates whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Plan templates whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the plan template with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the plan template with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the plan templates with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the plan templates with these ids."
            }
          },
          {
            "name": "IsDefault",
            "in": "query",
            "description": "true returns only your client's default template, false only the non-default ones.",
            "schema": {
              "type": "boolean",
              "description": "true returns only your client's default template, false only the non-default ones."
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "Templates assigned to the user with this id (a string GUID; see listUsers).",
            "schema": {
              "type": "string",
              "description": "Templates assigned to the user with this id (a string GUID; see listUsers)."
            }
          },
          {
            "name": "UserIdIn",
            "in": "query",
            "description": "Templates assigned to any of the users with these ids (string GUIDs; see listUsers).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Templates assigned to any of the users with these ids (string GUIDs; see listUsers)."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for plan templates. Allowed values: Name, Id.",
            "schema": {
              "enum": [
                "name",
                "id"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for plan templates. Allowed values: Name, Id."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "isDefault",
                  "description",
                  "note",
                  "icon",
                  "color"
                ],
                "type": "string",
                "description": "Selectable response fields of a plan template (used by the fields query parameter). The tenant\ncolumn is deliberately absent: it always equals the caller's own client, so it carries no\ninformation and is never selectable."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Creates a plan template for your client and returns it. With no planId the template is blank —\nwhich still means seeded with the default part scaffolding, not empty. With a planId the template\nis built FROM that plan, and the two include flags decide whether item descriptions and custom\ncolumns come along (both default to false).\nWhen to use: to stamp out consistent plans later; the returned id is listPlans' templateId filter\nand createPlan's templateId.\nNext: listPlanTemplateParts on the new template — a blank create seeds parts, so do not assume it\nis empty. patchPlanTemplate edits the template's own fields, and createPlan stamps a plan out of it.\nNot here: creating a PLAN from a template — createPlan does that, taking this id as templateId.\nValues of User-typed columns are never carried from a plan, and every carried value is stamped\nisDefault: true.",
        "description": "Creates a plan template for your client and returns it. With no planId the template is blank —\nwhich still means seeded with the default part scaffolding, not empty. With a planId the template\nis built FROM that plan, and the two include flags decide whether item descriptions and custom\ncolumns come along (both default to false).\nWhen to use: to stamp out consistent plans later; the returned id is listPlans' templateId filter\nand createPlan's templateId.\nNext: listPlanTemplateParts on the new template — a blank create seeds parts, so do not assume it\nis empty. patchPlanTemplate edits the template's own fields, and createPlan stamps a plan out of it.\nNot here: creating a PLAN from a template — createPlan does that, taking this id as templateId.\nValues of User-typed columns are never carried from a plan, and every carried value is stamped\nisDefault: true.",
        "operationId": "createPlanTemplate",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanTemplateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/PlanTemplates/{templateId}": {
      "get": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Returns one plan template by id (all public fields). A template of another client, or one you\nhave no permission on, is reported as not found rather than forbidden.\nNext: listPlanTemplateParts for this template's parts, whose partId the column and item listings\ntake; patchPlanTemplate edits this template's own fields and duplicatePlanTemplate copies it.\nNot here: editing what the template CONTAINS — its parts, its columns and its items each have their\nown write operations.",
        "description": "Returns one plan template by id (all public fields). A template of another client, or one you\nhave no permission on, is reported as not found rather than forbidden.\nNext: listPlanTemplateParts for this template's parts, whose partId the column and item listings\ntake; patchPlanTemplate edits this template's own fields and duplicatePlanTemplate copies it.\nNot here: editing what the template CONTAINS — its parts, its columns and its items each have their\nown write operations.",
        "operationId": "getPlanTemplate",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Applies a JSON Patch document to a plan template you can access and returns the updated template.\nWhen to use: to edit the template's own fields — /name, /description, /icon, /color, /isDefault.\nThe document is validated as a whole first: one unknown path rejects the request and writes\nnothing.\nEvery operation must carry a value: a remove, or a replace with null, is rejected with 400 on EVERY\npath. Send \"\" to blank a text field and false to unset /isDefault; /name cannot be blanked.\nNext: getPlanTemplate re-reads the same template; listPlanTemplateParts reads its structure.\nNot here: the template's parts (patchPlanTemplatePart edits one), its columns\n(patchPlanTemplateColumn edits one) and its items (patchPlanTemplateItem edits one). /note is\nNOT writable, and per-user assignments are carried over unchanged except an Admin assignee's row,\nwhich is dropped (it grants nothing — an Admin reaches every template by role).",
        "description": "Applies a JSON Patch document to a plan template you can access and returns the updated template.\nWhen to use: to edit the template's own fields — /name, /description, /icon, /color, /isDefault.\nThe document is validated as a whole first: one unknown path rejects the request and writes\nnothing.\nEvery operation must carry a value: a remove, or a replace with null, is rejected with 400 on EVERY\npath. Send \"\" to blank a text field and false to unset /isDefault; /name cannot be blanked.\nNext: getPlanTemplate re-reads the same template; listPlanTemplateParts reads its structure.\nNot here: the template's parts (patchPlanTemplatePart edits one), its columns\n(patchPlanTemplateColumn edits one) and its items (patchPlanTemplateItem edits one). /note is\nNOT writable, and per-user assignments are carried over unchanged except an Admin assignee's row,\nwhich is dropped (it grants nothing — an Admin reaches every template by role).",
        "operationId": "patchPlanTemplate",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/PlanTemplates/{templateId}/parts": {
      "get": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Lists the parts (sections) of a plan template you can access.\nNext: returns the partId taken by listPlanTemplateColumns, listPlanTemplateItems and\ngetPlanTemplateItem.\nNot here: the parts of a PLAN — listPlanParts lists those; a plan part records the template part\nit was copied from as its planTemplatePartId, but the two ids are not interchangeable.",
        "description": "Lists the parts (sections) of a plan template you can access.\nNext: returns the partId taken by listPlanTemplateColumns, listPlanTemplateItems and\ngetPlanTemplateItem.\nNot here: the parts of a PLAN — listPlanParts lists those; a plan part records the template part\nit was copied from as its planTemplatePartId, but the two ids are not interchangeable.",
        "operationId": "listPlanTemplateParts",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplatePartResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Adds a part (section) to a plan template you can access and returns it.\nWhen to use: only to add the ONE part a template can still hold. Two database rules bound this\nhard, and both answer 400: at most one part per typeEnum, and at most one part with isDefault\ntrue plus one with isDefault false. A template made by createPlanTemplate already carries a\n\"plan\" part flagged isDefault, so the only combination it accepts is typeEnum \"undefined\" with\nisDefault false — and after that it accepts none.\nNext: the returned id is a partId like any other — listPlanTemplateColumns and\nlistPlanTemplateItems read it. A new part starts with NO\ncolumns and NO items.\nSend an Idempotency-Key so a retry replays instead of creating a second part.\nNot here: the parts of a PLAN (no plan-part write exists), and reordering — sortOrder comes from\ninsertAfterPartId at create time and cannot be changed afterwards.",
        "description": "Adds a part (section) to a plan template you can access and returns it.\nWhen to use: only to add the ONE part a template can still hold. Two database rules bound this\nhard, and both answer 400: at most one part per typeEnum, and at most one part with isDefault\ntrue plus one with isDefault false. A template made by createPlanTemplate already carries a\n\"plan\" part flagged isDefault, so the only combination it accepts is typeEnum \"undefined\" with\nisDefault false — and after that it accepts none.\nNext: the returned id is a partId like any other — listPlanTemplateColumns and\nlistPlanTemplateItems read it. A new part starts with NO\ncolumns and NO items.\nSend an Idempotency-Key so a retry replays instead of creating a second part.\nNot here: the parts of a PLAN (no plan-part write exists), and reordering — sortOrder comes from\ninsertAfterPartId at create time and cannot be changed afterwards.",
        "operationId": "createPlanTemplatePart",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanTemplatePartInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplatePartResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/PlanTemplates/{templateId}/parts/{partId}/columns": {
      "get": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Lists the columns of a plan-template part you can access.\nWhen to use: to learn the shape of a part's rows before reading them with\nlistPlanTemplateItems, and to learn which columns a template item's values may be written to —\neach column carries isEditable and the patchPath that will write it.\nA dropdown-backed column such as Status also carries options, its allowed values as id + label:\nan item's value in that column IS one of those ids, never the label, and a template column's\noptions are its own — not those of a plan column.\nNext: listPlanTemplateItems for the rows; match a column's id against an item's\ncolumns[].columnId. createPlanTemplateColumn adds a column, patchPlanTemplateColumn edits one\nand updatePlanTemplateRecurringColumns toggles the recurring block.\nNot here: the columns of a PLAN — listPlanColumns reads those through planId + partId.",
        "description": "Lists the columns of a plan-template part you can access.\nWhen to use: to learn the shape of a part's rows before reading them with\nlistPlanTemplateItems, and to learn which columns a template item's values may be written to —\neach column carries isEditable and the patchPath that will write it.\nA dropdown-backed column such as Status also carries options, its allowed values as id + label:\nan item's value in that column IS one of those ids, never the label, and a template column's\noptions are its own — not those of a plan column.\nNext: listPlanTemplateItems for the rows; match a column's id against an item's\ncolumns[].columnId. createPlanTemplateColumn adds a column, patchPlanTemplateColumn edits one\nand updatePlanTemplateRecurringColumns toggles the recurring block.\nNot here: the columns of a PLAN — listPlanColumns reads those through planId + partId.",
        "operationId": "listPlanTemplateColumns",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateColumnResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Creates a column in a plan-template part and returns it. label and typeEnum are required.\nWhen to use: to add a field to the rows of every plan stamped out of this template. A part holds at\nmost one column of each type except customAppField, so a second column of a type it already has is\n400 — and a template's seeded part already has all of them, which makes a part from\ncreatePlanTemplatePart the place to add core types.\nA dropdown-backed column — typeEnum status, or customTypeEnum singleSelectDropDown — REQUIRES options,\nwhose ids the server mints (sending an id is 400): read them off the echo.\nSend an Idempotency-Key so a retry replays the first response instead of creating a second column.\nNext: patchPlanTemplateColumn edits /label, /description, /sortOrder and /options.\nNot here: choosing the position (the column is appended), the UI style and display settings, and the\ntemplate items' values - patchPlanTemplateItem writes those.",
        "description": "Creates a column in a plan-template part and returns it. label and typeEnum are required.\nWhen to use: to add a field to the rows of every plan stamped out of this template. A part holds at\nmost one column of each type except customAppField, so a second column of a type it already has is\n400 — and a template's seeded part already has all of them, which makes a part from\ncreatePlanTemplatePart the place to add core types.\nA dropdown-backed column — typeEnum status, or customTypeEnum singleSelectDropDown — REQUIRES options,\nwhose ids the server mints (sending an id is 400): read them off the echo.\nSend an Idempotency-Key so a retry replays the first response instead of creating a second column.\nNext: patchPlanTemplateColumn edits /label, /description, /sortOrder and /options.\nNot here: choosing the position (the column is appended), the UI style and display settings, and the\ntemplate items' values - patchPlanTemplateItem writes those.",
        "operationId": "createPlanTemplateColumn",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanColumnInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateColumnResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/PlanTemplates/{templateId}/parts/{partId}/items": {
      "get": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Lists the items (rows) of a plan-template part you can access, in the part's own order, each with\nits column values. Items are scoped to the part AND to the template: a partId belonging to\nanother template is reported as not found.\nWhen to use: to inspect what a plan created from this template will start with. Only values whose\nisDefault is true are copied into a new plan. Supports id/ids/parentId/parentIdIn filters and view\n(Full default; Summary omits description, descriptionLength is in both), same as listPlanItems.\nNext: returns the itemId taken by getPlanTemplateItem.\nNot here: the items of a PLAN — listPlanItems reads those through planId + partId.",
        "description": "Lists the items (rows) of a plan-template part you can access, in the part's own order, each with\nits column values. Items are scoped to the part AND to the template: a partId belonging to\nanother template is reported as not found.\nWhen to use: to inspect what a plan created from this template will start with. Only values whose\nisDefault is true are copied into a new plan. Supports id/ids/parentId/parentIdIn filters and view\n(Full default; Summary omits description, descriptionLength is in both), same as listPlanItems.\nNext: returns the itemId taken by getPlanTemplateItem.\nNot here: the items of a PLAN — listPlanItems reads those through planId + partId.",
        "operationId": "listPlanTemplateItems",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the item with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the item with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the items with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items with these ids."
            }
          },
          {
            "name": "ParentId",
            "in": "query",
            "description": "Items nested directly under the item with this id.",
            "schema": {
              "type": "integer",
              "description": "Items nested directly under the item with this id.",
              "format": "int32"
            }
          },
          {
            "name": "ParentIdIn",
            "in": "query",
            "description": "Items nested directly under any of the items with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items nested directly under any of the items with these ids."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Full by default, matching listPlanItems: this list shipped with the description in the row, and\nthe contract is additive inside v1, so defaulting to Summary would silently remove a field from\nevery existing caller's response.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateItemResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Creates an item (row) in a plan-template part and returns it. typeEnum is required.\nWhen to use: to give a template part its rows, so plans stamped out of it start with them. An item\nhas no name field: its name is its value in the part's Name-type column, sent through columns and\nkeyed by the columnId listPlanTemplateColumns returns. Only a column whose isEditable is true may be\nnamed - a read-only column is 400, a column of another part 404, and nothing is written. Each value\ncarries its own isDefault, which defaults to TRUE and decides whether it is copied into plans made\nfrom this template. typeEnum is item or group; undefined and midItem are 400. parentId nests the row\nunder an item of the SAME part. Send an Idempotency-Key so a retry replays instead of creating a\nsecond item.\nNext: patchPlanTemplateItem edits it and copyPlanTemplateItem duplicates it.\nNot here: choosing the sort order (the item is appended) and creating a row in a PLAN.",
        "description": "Creates an item (row) in a plan-template part and returns it. typeEnum is required.\nWhen to use: to give a template part its rows, so plans stamped out of it start with them. An item\nhas no name field: its name is its value in the part's Name-type column, sent through columns and\nkeyed by the columnId listPlanTemplateColumns returns. Only a column whose isEditable is true may be\nnamed - a read-only column is 400, a column of another part 404, and nothing is written. Each value\ncarries its own isDefault, which defaults to TRUE and decides whether it is copied into plans made\nfrom this template. typeEnum is item or group; undefined and midItem are 400. parentId nests the row\nunder an item of the SAME part. Send an Idempotency-Key so a retry replays instead of creating a\nsecond item.\nNext: patchPlanTemplateItem edits it and copyPlanTemplateItem duplicates it.\nNot here: choosing the sort order (the item is appended) and creating a row in a PLAN.",
        "operationId": "createPlanTemplateItem",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanTemplateItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Writes the SAME column values into several items of one plan-template part and returns a per-item\noutcome. The body is {itemIds, patch}: itemIds is required and non-empty (an empty list is 400,\nnever \"all items\"), and patch is a JSON Patch naming /columns/{columnId} ONLY, each value\n{value, sortOrder}.\nWhen to use: to set one field across many rows in one call. The scalar paths patchPlanTemplateItem\naccepts are 400 here, as is a non-editable column of this part; a column of another part is not\nfound. The whole document is validated first, so a bad request changes nothing. A value written here\nis always isDefault FALSE, so use patchPlanTemplateItem when it must propagate into new plans. The\nanswer is a PARTIAL SUCCESS: 200 with items[] and errors[{id, code, message}] even when every id\nfailed; an id the part does not hold is a notFound entry while the others still update.\nNext: listPlanTemplateItems re-reads the result.\nNot here: deleting or moving many items.",
        "description": "Writes the SAME column values into several items of one plan-template part and returns a per-item\noutcome. The body is {itemIds, patch}: itemIds is required and non-empty (an empty list is 400,\nnever \"all items\"), and patch is a JSON Patch naming /columns/{columnId} ONLY, each value\n{value, sortOrder}.\nWhen to use: to set one field across many rows in one call. The scalar paths patchPlanTemplateItem\naccepts are 400 here, as is a non-editable column of this part; a column of another part is not\nfound. The whole document is validated first, so a bad request changes nothing. A value written here\nis always isDefault FALSE, so use patchPlanTemplateItem when it must propagate into new plans. The\nanswer is a PARTIAL SUCCESS: 200 with items[] and errors[{id, code, message}] even when every id\nfailed; an id the part does not hold is a notFound entry while the others still update.\nNext: listPlanTemplateItems re-reads the result.\nNot here: deleting or moving many items.",
        "operationId": "patchPlanTemplateItems",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanItemsBulkPatchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateItemsBulkPatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/PlanTemplates/{templateId}/parts/{partId}/items/{itemId}": {
      "get": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Returns one item of a plan-template part you can access, with its column values. An item that is\nnot part of the given part and template is reported as not found.\nWhen to use: to read a single row's values, including each value's isDefault flag.\nNext: patchPlanTemplateItem writes this item's fields and its column values (each column's\npatchPath comes from listPlanTemplateColumns) and copyPlanTemplateItem duplicates it.\nNot here: the item's images, and the items of a PLAN — getPlanItem reads those.",
        "description": "Returns one item of a plan-template part you can access, with its column values. An item that is\nnot part of the given part and template is reported as not found.\nWhen to use: to read a single row's values, including each value's isDefault flag.\nNext: patchPlanTemplateItem writes this item's fields and its column values (each column's\npatchPath comes from listPlanTemplateColumns) and copyPlanTemplateItem duplicates it.\nNot here: the item's images, and the items of a PLAN — getPlanItem reads those.",
        "operationId": "getPlanTemplateItem",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Applies a JSON Patch to an item of a plan-template part and returns it. Patchable: /isActive,\n/isCollapsed, /sortOrder, /description, /parentId, plus /columns/{columnId}. Any other path is 400,\nand the document is validated whole first, so one bad operation writes nothing. Only a column whose\nisEditable is true may be named - its patchPath is the exact path; a column of another part is not\nfound. A /columns operation REPLACES that column's values, each carrying its own isDefault, which\ndefaults to true. /parentId moves the item in its part's tree: the new parent must be another item\nof the SAME part (a foreign id is not found), and its own id or one nested under it is 400. The move\nis POSITIONAL (the item lands LAST under the new parent), and /sortOrder in the same document\napplies after it, verbatim. remove writes the field's default, and clears the column on\n/columns/{columnId}.\nNot here: writing many items at once - patchPlanTemplateItems does that, columns only.",
        "description": "Applies a JSON Patch to an item of a plan-template part and returns it. Patchable: /isActive,\n/isCollapsed, /sortOrder, /description, /parentId, plus /columns/{columnId}. Any other path is 400,\nand the document is validated whole first, so one bad operation writes nothing. Only a column whose\nisEditable is true may be named - its patchPath is the exact path; a column of another part is not\nfound. A /columns operation REPLACES that column's values, each carrying its own isDefault, which\ndefaults to true. /parentId moves the item in its part's tree: the new parent must be another item\nof the SAME part (a foreign id is not found), and its own id or one nested under it is 400. The move\nis POSITIONAL (the item lands LAST under the new parent), and /sortOrder in the same document\napplies after it, verbatim. remove writes the field's default, and clears the column on\n/columns/{columnId}.\nNot here: writing many items at once - patchPlanTemplateItems does that, columns only.",
        "operationId": "patchPlanTemplateItem",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/PlanTemplates/{templateId}/duplicate": {
      "post": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Copies a plan template you can access — its parts, columns, items and values — and returns the\ncopy. The copy's name is the source's name plus \" - Copy\" (\" - Copy(2)\" and so on when that name is\ntaken), and it is never the client default, whatever the source was. Takes no body.\nWhen to use: to branch an existing blueprint instead of rebuilding it; patchPlanTemplate then\nrenames the copy.\nNext: the returned id is a templateId like any other — listPlanTemplateParts reads the copy's\nstructure, and createPlan accepts it as templateId.\nNot here: copying a PLAN, and copying a template of another client (that is reported as not found).",
        "description": "Copies a plan template you can access — its parts, columns, items and values — and returns the\ncopy. The copy's name is the source's name plus \" - Copy\" (\" - Copy(2)\" and so on when that name is\ntaken), and it is never the client default, whatever the source was. Takes no body.\nWhen to use: to branch an existing blueprint instead of rebuilding it; patchPlanTemplate then\nrenames the copy.\nNext: the returned id is a templateId like any other — listPlanTemplateParts reads the copy's\nstructure, and createPlan accepts it as templateId.\nNot here: copying a PLAN, and copying a template of another client (that is reported as not found).",
        "operationId": "duplicatePlanTemplate",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/PlanTemplates/{templateId}/parts/{partId}": {
      "patch": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Applies a JSON Patch document to a part of a plan template you can access and returns the updated\npart.\nWhen to use: to edit a part's own fields — /label, /color, /icon, /isActive, /isDefault. The\ndocument is validated as a whole first: one unknown path rejects the request and writes nothing.\n/color and /icon accept a remove, which really clears them; /label, /isActive and /isDefault do\nnot — and /label is unblankable in every spelling, so an empty string is 400 too, not a way round\nit. /isDefault is single-valued per template AND so is its opposite, so changing it is 400\nwhenever another part of the template already carries the value asked for — in either direction.\nNext: listPlanTemplateParts re-reads the part.\nNot here: /sortOrder and /typeEnum — a part's position and type are fixed at create time, and the\npart's columns and items are their own resources.",
        "description": "Applies a JSON Patch document to a part of a plan template you can access and returns the updated\npart.\nWhen to use: to edit a part's own fields — /label, /color, /icon, /isActive, /isDefault. The\ndocument is validated as a whole first: one unknown path rejects the request and writes nothing.\n/color and /icon accept a remove, which really clears them; /label, /isActive and /isDefault do\nnot — and /label is unblankable in every spelling, so an empty string is 400 too, not a way round\nit. /isDefault is single-valued per template AND so is its opposite, so changing it is 400\nwhenever another part of the template already carries the value asked for — in either direction.\nNext: listPlanTemplateParts re-reads the part.\nNot here: /sortOrder and /typeEnum — a part's position and type are fixed at create time, and the\npart's columns and items are their own resources.",
        "operationId": "patchPlanTemplatePart",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplatePartResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/PlanTemplates/{templateId}/parts/{partId}/columns/{columnId}": {
      "patch": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Applies a JSON Patch to a column of a plan-template part and returns it.\nWhen to use: to rename a column (/label), describe it (/description), move it (/sortOrder) or change a\ndropdown column's allowed values (/options). The document is validated whole first, so one unknown path\nwrites nothing — /typeEnum, /isActive, /isRecurring and /isExcel included.\n/options is a FULL REPLACEMENT list: resend an option's id to keep it, leave it out to drop it, omit the\nid to add one. Each id must be a current option id of the column, used once; otherwise 400. It is 400 on\na column that is not dropdown-backed, and a dropped option does NOT clear the template item values\nholding its id — they stop resolving.\nremove clears /description only, and is 400 on /label, /sortOrder and /options. /sortOrder must be\ngreater than 0 and free in the part.\nNot here: turning a column on or off (updatePlanTemplateRecurringColumns does the recurring ones), and\nthe column's UI style and display settings.",
        "description": "Applies a JSON Patch to a column of a plan-template part and returns it.\nWhen to use: to rename a column (/label), describe it (/description), move it (/sortOrder) or change a\ndropdown column's allowed values (/options). The document is validated whole first, so one unknown path\nwrites nothing — /typeEnum, /isActive, /isRecurring and /isExcel included.\n/options is a FULL REPLACEMENT list: resend an option's id to keep it, leave it out to drop it, omit the\nid to add one. Each id must be a current option id of the column, used once; otherwise 400. It is 400 on\na column that is not dropdown-backed, and a dropped option does NOT clear the template item values\nholding its id — they stop resolving.\nremove clears /description only, and is 400 on /label, /sortOrder and /options. /sortOrder must be\ngreater than 0 and free in the part.\nNot here: turning a column on or off (updatePlanTemplateRecurringColumns does the recurring ones), and\nthe column's UI style and display settings.",
        "operationId": "patchPlanTemplateColumn",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "columnId",
            "in": "path",
            "description": "Column id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateColumnResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/PlanTemplates/{templateId}/parts/{partId}/columns/recurring": {
      "put": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Activates or deactivates EVERY recurring column of a plan-template part at once and returns the part's\ncolumns.\nWhen to use: to show or hide the template's recurring block — quantity, recurring total, effective,\ncancellation and period — so plans stamped out of it start the same way. The body is one required flag,\nisActive; there is no per-column form of this operation, and no external operation makes a column\nrecurring.\nDeactivating keeps every template item value and drops only the saved filter values on those columns,\nwhich is what makes it reversible. A part with no recurring\ncolumns answers 200 having changed nothing.\nNext: the returned page is what listPlanTemplateColumns would read back; patchPlanTemplateColumn edits\none column's own fields.\nNot here: activating a column that is not recurring, and the recurring columns of a PLAN —\nupdatePlanRecurringColumns does those.",
        "description": "Activates or deactivates EVERY recurring column of a plan-template part at once and returns the part's\ncolumns.\nWhen to use: to show or hide the template's recurring block — quantity, recurring total, effective,\ncancellation and period — so plans stamped out of it start the same way. The body is one required flag,\nisActive; there is no per-column form of this operation, and no external operation makes a column\nrecurring.\nDeactivating keeps every template item value and drops only the saved filter values on those columns,\nwhich is what makes it reversible. A part with no recurring\ncolumns answers 200 having changed nothing.\nNext: the returned page is what listPlanTemplateColumns would read back; patchPlanTemplateColumn edits\none column's own fields.\nNot here: activating a column that is not recurring, and the recurring columns of a PLAN —\nupdatePlanRecurringColumns does those.",
        "operationId": "updatePlanTemplateRecurringColumns",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanRecurringColumnsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateColumnResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/PlanTemplates/{templateId}/parts/{partId}/items/{itemId}/copy": {
      "post": {
        "tags": [
          "PlanTemplates"
        ],
        "summary": "Duplicates one item of a plan-template part and returns the copy. No body.\nWhen to use: to add a row that starts out identical to an existing one - the copy carries the\nsource's values in every column, each keeping its own isDefault, so it is cheaper and safer than\nre-sending them on createPlanTemplateItem.\nWhat is copied: the item itself, its column values and its image links. The items nested UNDER it\nare NOT copied - copy them one by one and reparent them with patchPlanTemplateItem /parentId. The\ncopy keeps the source's parent and lands directly after the source among its siblings.\nSend an Idempotency-Key so a retry replays the first response instead of creating a second copy.\nNext: patchPlanTemplateItem edits the copy (its id is in the response).\nNot here: copying a whole part or a template (duplicatePlanTemplate does that), copying an item into\na DIFFERENT part or template, and copying a row of a PLAN - copyPlanItem does that.",
        "description": "Duplicates one item of a plan-template part and returns the copy. No body.\nWhen to use: to add a row that starts out identical to an existing one - the copy carries the\nsource's values in every column, each keeping its own isDefault, so it is cheaper and safer than\nre-sending them on createPlanTemplateItem.\nWhat is copied: the item itself, its column values and its image links. The items nested UNDER it\nare NOT copied - copy them one by one and reparent them with patchPlanTemplateItem /parentId. The\ncopy keeps the source's parent and lands directly after the source among its siblings.\nSend an Idempotency-Key so a retry replays the first response instead of creating a second copy.\nNext: patchPlanTemplateItem edits the copy (its id is in the response).\nNot here: copying a whole part or a template (duplicatePlanTemplate does that), copying an item into\na DIFFERENT part or template, and copying a row of a PLAN - copyPlanItem does that.",
        "operationId": "copyPlanTemplateItem",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "description": "Plan template id (see listPlanTemplates).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Lists the PSA projects of the caller's client, paged (25 by default, at most 100), with filters, sort and field\nselection, scoped to the companies the caller can see; a company whose status hides companies is left out.\nEvery sync state is listed (linkStatus: mapped while ConnectWise still syncs the project, else orphan, wasMapped\nor none), closed projects included (filter with isClosed or statusMeans). Projects come from the ConnectWise\nsync and nothing here creates or deletes one; the one field you can write is isInternal. companyId comes from\nlistCompanies; statusId, typeId, boardId, managerId and proposalId from a project's own refs.\nWhen to use: projects are one flat client-wide list; no report or part id.\nNext: returns the projectId getProject, patchProject and the link operations take.\nNot here: what a custom field in columnValues is (listProjectColumns); adding or removing links\n(linkProjectInitiatives, linkProjectPlanItems and their unlink twins).",
        "description": "Lists the PSA projects of the caller's client, paged (25 by default, at most 100), with filters, sort and field\nselection, scoped to the companies the caller can see; a company whose status hides companies is left out.\nEvery sync state is listed (linkStatus: mapped while ConnectWise still syncs the project, else orphan, wasMapped\nor none), closed projects included (filter with isClosed or statusMeans). Projects come from the ConnectWise\nsync and nothing here creates or deletes one; the one field you can write is isInternal. companyId comes from\nlistCompanies; statusId, typeId, boardId, managerId and proposalId from a project's own refs.\nWhen to use: projects are one flat client-wide list; no report or part id.\nNext: returns the projectId getProject, patchProject and the link operations take.\nNot here: what a custom field in columnValues is (listProjectColumns); adding or removing links\n(linkProjectInitiatives, linkProjectPlanItems and their unlink twins).",
        "operationId": "listProjects",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Projects whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Projects whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Projects whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Projects whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Projects whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Projects whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Projects whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Projects whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the project with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the project with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the projects with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the projects with these ids."
            }
          },
          {
            "name": "CompanyId",
            "in": "query",
            "description": "Projects belonging to the company with this id (see listCompanies).",
            "schema": {
              "type": "integer",
              "description": "Projects belonging to the company with this id (see listCompanies).",
              "format": "int32"
            }
          },
          {
            "name": "CompanyIdIn",
            "in": "query",
            "description": "Projects belonging to any of the companies with these ids (see listCompanies).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Projects belonging to any of the companies with these ids (see listCompanies)."
            }
          },
          {
            "name": "StatusId",
            "in": "query",
            "description": "Projects with this status: the id of a project's own status object (status.id).",
            "schema": {
              "type": "integer",
              "description": "Projects with this status: the id of a project's own status object (status.id).",
              "format": "int32"
            }
          },
          {
            "name": "StatusIdIn",
            "in": "query",
            "description": "Projects with any of these statuses (ids of projects' own status objects).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Projects with any of these statuses (ids of projects' own status objects)."
            }
          },
          {
            "name": "TypeId",
            "in": "query",
            "description": "Projects of this type: the id of a project's own type object (type.id).",
            "schema": {
              "type": "integer",
              "description": "Projects of this type: the id of a project's own type object (type.id).",
              "format": "int32"
            }
          },
          {
            "name": "TypeIdIn",
            "in": "query",
            "description": "Projects of any of these types (ids of projects' own type objects).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Projects of any of these types (ids of projects' own type objects)."
            }
          },
          {
            "name": "BoardId",
            "in": "query",
            "description": "Projects on this PSA project board: the id of a project's own board object (board.id).",
            "schema": {
              "type": "integer",
              "description": "Projects on this PSA project board: the id of a project's own board object (board.id).",
              "format": "int32"
            }
          },
          {
            "name": "BoardIdIn",
            "in": "query",
            "description": "Projects on any of these PSA project boards (ids of projects' own board objects).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Projects on any of these PSA project boards (ids of projects' own board objects)."
            }
          },
          {
            "name": "ManagerId",
            "in": "query",
            "description": "Projects managed by this PSA member: the id of a project's own manager object (manager.id), not a user id. Projects without a manager are not matched.",
            "schema": {
              "type": "integer",
              "description": "Projects managed by this PSA member: the id of a project's own manager object (manager.id), not a user id. Projects without a manager are not matched.",
              "format": "int32"
            }
          },
          {
            "name": "ManagerIdIn",
            "in": "query",
            "description": "Projects managed by any of these PSA members (ids of projects' own manager objects). Projects without a manager are not matched.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Projects managed by any of these PSA members (ids of projects' own manager objects). Projects without a manager are not matched."
            }
          },
          {
            "name": "ProposalId",
            "in": "query",
            "description": "Projects that came from this PSA opportunity: the id of a project's own proposal object (proposal.id), not a v1/proposals id. Projects without a proposal are not matched.",
            "schema": {
              "type": "integer",
              "description": "Projects that came from this PSA opportunity: the id of a project's own proposal object (proposal.id), not a v1/proposals id. Projects without a proposal are not matched.",
              "format": "int32"
            }
          },
          {
            "name": "ProposalIdIn",
            "in": "query",
            "description": "Projects that came from any of these PSA opportunities (ids of projects' own proposal objects, not v1/proposals ids). Projects without a proposal are not matched.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Projects that came from any of these PSA opportunities (ids of projects' own proposal objects, not v1/proposals ids). Projects without a proposal are not matched."
            }
          },
          {
            "name": "StatusMeans",
            "in": "query",
            "description": "Projects whose status means this to StrategyOverview: open, onHold or closed.",
            "schema": {
              "enum": [
                "open",
                "onHold",
                "closed"
              ],
              "type": "string",
              "description": "Projects whose status means this to StrategyOverview: open, onHold or closed."
            }
          },
          {
            "name": "StatusMeansIn",
            "in": "query",
            "description": "Projects whose status means any of these to StrategyOverview: open, onHold, closed.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "open",
                  "onHold",
                  "closed"
                ],
                "type": "string"
              },
              "description": "Projects whose status means any of these to StrategyOverview: open, onHold, closed."
            }
          },
          {
            "name": "IsClosed",
            "in": "query",
            "description": "true: only closed projects (status means closed); false: only projects that are not closed (open or onHold). Closed projects are listed unless filtered out.",
            "schema": {
              "type": "boolean",
              "description": "true: only closed projects (status means closed); false: only projects that are not closed (open or onHold). Closed projects are listed unless filtered out."
            }
          },
          {
            "name": "IsInternal",
            "in": "query",
            "description": "Projects whose own Internal flag (isInternal, the one patchProject writes, stored as sent) has this value. A project is hidden from client users while isInternal is true or inheritedInternalSources is not empty, so isInternal=false still returns the projects internal through their status, type or board.",
            "schema": {
              "type": "boolean",
              "description": "Projects whose own Internal flag (isInternal, the one patchProject writes, stored as sent) has this value. A project is hidden from client users while isInternal is true or inheritedInternalSources is not empty, so isInternal=false still returns the projects internal through their status, type or board."
            }
          },
          {
            "name": "LinkStatus",
            "in": "query",
            "description": "Projects in this sync state: mapped = synced from the PSA now, the only state that takes new links; orphan = was synced, no longer found in the PSA; wasMapped = was synced, then cut from the sync by an integration-settings change; none = never synced.",
            "schema": {
              "enum": [
                "none",
                "mapped",
                "orphan",
                "wasMapped"
              ],
              "type": "string",
              "description": "Projects in this sync state: mapped = synced from the PSA now, the only state that takes new links; orphan = was synced, no longer found in the PSA; wasMapped = was synced, then cut from the sync by an integration-settings change; none = never synced."
            }
          },
          {
            "name": "LinkStatusIn",
            "in": "query",
            "description": "Projects in any of these sync states: mapped = synced from the PSA now, the only state that takes new links; orphan = was synced, no longer found in the PSA; wasMapped = was synced, then cut from the sync by an integration-settings change; none = never synced.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "none",
                  "mapped",
                  "orphan",
                  "wasMapped"
                ],
                "type": "string"
              },
              "description": "Projects in any of these sync states: mapped = synced from the PSA now, the only state that takes new links; orphan = was synced, no longer found in the PSA; wasMapped = was synced, then cut from the sync by an integration-settings change; none = never synced."
            }
          },
          {
            "name": "StartDateAfter",
            "in": "query",
            "description": "Projects whose start date is on or after this date. Projects with no start date are not matched.",
            "schema": {
              "type": "string",
              "description": "Projects whose start date is on or after this date. Projects with no start date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "StartDateBefore",
            "in": "query",
            "description": "Projects whose start date is on or before this date. Projects with no start date are not matched.",
            "schema": {
              "type": "string",
              "description": "Projects whose start date is on or before this date. Projects with no start date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "EstimatedCompletionDateAfter",
            "in": "query",
            "description": "Projects whose estimated completion date is on or after this date. Projects with no estimated completion date are not matched.",
            "schema": {
              "type": "string",
              "description": "Projects whose estimated completion date is on or after this date. Projects with no estimated completion date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "EstimatedCompletionDateBefore",
            "in": "query",
            "description": "Projects whose estimated completion date is on or before this date. Projects with no estimated completion date are not matched.",
            "schema": {
              "type": "string",
              "description": "Projects whose estimated completion date is on or before this date. Projects with no estimated completion date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "ActualCompletionDateAfter",
            "in": "query",
            "description": "Projects whose actual completion date is on or after this date. Projects with no actual completion date are not matched.",
            "schema": {
              "type": "string",
              "description": "Projects whose actual completion date is on or after this date. Projects with no actual completion date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "ActualCompletionDateBefore",
            "in": "query",
            "description": "Projects whose actual completion date is on or before this date. Projects with no actual completion date are not matched.",
            "schema": {
              "type": "string",
              "description": "Projects whose actual completion date is on or before this date. Projects with no actual completion date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedAtAfter",
            "in": "query",
            "description": "Projects created on or after this instant (UTC).",
            "schema": {
              "type": "string",
              "description": "Projects created on or after this instant (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedAtBefore",
            "in": "query",
            "description": "Projects created on or before this instant (UTC).",
            "schema": {
              "type": "string",
              "description": "Projects created on or before this instant (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedAtAfter",
            "in": "query",
            "description": "Projects last updated on or after this instant (UTC). A project never updated since creation has no updatedAt and is never matched: use createdAtAfter as well to catch new projects.",
            "schema": {
              "type": "string",
              "description": "Projects last updated on or after this instant (UTC). A project never updated since creation has no updatedAt and is never matched: use createdAtAfter as well to catch new projects.",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedAtBefore",
            "in": "query",
            "description": "Projects last updated on or before this instant (UTC). Projects never updated since creation (updatedAt null) are not matched.",
            "schema": {
              "type": "string",
              "description": "Projects last updated on or before this instant (UTC). Projects never updated since creation (updatedAt null) are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for projects. Allowed values: Name (the default), StartDate, EstimatedCompletionDate,\nActualCompletionDate, PercentComplete, CreatedAt, UpdatedAt. Ties break by id following sortDir; the company name\nis never a sort key.",
            "schema": {
              "enum": [
                "name",
                "startDate",
                "estimatedCompletionDate",
                "actualCompletionDate",
                "percentComplete",
                "createdAt",
                "updatedAt"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for projects. Allowed values: Name (the default), StartDate, EstimatedCompletionDate,\nActualCompletionDate, PercentComplete, CreatedAt, UpdatedAt. Ties break by id following sortDir; the company name\nis never a sort key."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "company",
                  "status",
                  "type",
                  "board",
                  "manager",
                  "proposal",
                  "startDate",
                  "estimatedCompletionDate",
                  "actualCompletionDate",
                  "percentComplete",
                  "budgetHours",
                  "actualHours",
                  "budgetAmount",
                  "currencyCode",
                  "isInternal",
                  "inheritedInternalSources",
                  "linkStatus",
                  "integratedSystemId",
                  "integrationId",
                  "columnValues",
                  "createdAt",
                  "updatedAt",
                  "relationships"
                ],
                "type": "string",
                "description": "Selectable response fields of a project (used by the fields query parameter). Allowed values: Id, Name, Company,\nStatus, Type, Board, Manager, Proposal, StartDate, EstimatedCompletionDate, ActualCompletionDate, PercentComplete,\nBudgetHours, ActualHours, BudgetAmount, CurrencyCode, IsInternal, InheritedInternalSources, LinkStatus,\nIntegratedSystemId, IntegrationId, ColumnValues, CreatedAt, UpdatedAt, Relationships. The description is not\nselectable: getProject returns it."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Returns one project of the caller's client by id, always in the Full shape, with its description and its\nrelationships. A project of another client, one in a company the caller cannot see and an id that matches\nnothing are all reported as notFound.\nWhen to use: on a projectId from listProjects.\nNext: patchProject takes the same projectId; linkProjectInitiatives and linkProjectPlanItems add links.\nNot here: the linked initiative items and plan items in full (getInitiativeItem, getPlanItem); creating a\nproject, which only the ConnectWise sync does; deleting one, which only an Admin or Manager does, for unmapped\nprojects, in the application.",
        "description": "Returns one project of the caller's client by id, always in the Full shape, with its description and its\nrelationships. A project of another client, one in a company the caller cannot see and an id that matches\nnothing are all reported as notFound.\nWhen to use: on a projectId from listProjects.\nNext: patchProject takes the same projectId; linkProjectInitiatives and linkProjectPlanItems add links.\nNot here: the linked initiative items and plan items in full (getInitiativeItem, getPlanItem); creating a\nproject, which only the ConnectWise sync does; deleting one, which only an Admin or Manager does, for unmapped\nprojects, in the application.",
        "operationId": "getProject",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project id (see listProjects).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Projects"
        ],
        "summary": "Sets the Internal flag of one project of your client and returns it in the Full shape (without relationships).\nThe only writable path is /isInternal, true or false; any other path, a remove or a null is validationFailed and\nnothing is written. The flag is stored as sent, even while the project's status, type or board makes it internal\nanyway (inheritedInternalSources). An internal project is hidden from client users in the application. A project\nof another client, or in a company you cannot see, is notFound.\nWhen to use: on a projectId from listProjects, to hide a project from client users or show a mapped one again.\nNext: getProject or listProjects re-reads the project.\nNot here: every other field, which the ConnectWise sync owns; several projects at once (one patchProject per\nprojectId); links (linkProjectInitiatives, linkProjectPlanItems and their unlink twins).",
        "description": "Sets the Internal flag of one project of your client and returns it in the Full shape (without relationships).\nThe only writable path is /isInternal, true or false; any other path, a remove or a null is validationFailed and\nnothing is written. The flag is stored as sent, even while the project's status, type or board makes it internal\nanyway (inheritedInternalSources). An internal project is hidden from client users in the application. A project\nof another client, or in a company you cannot see, is notFound.\nWhen to use: on a projectId from listProjects, to hide a project from client users or show a mapped one again.\nNext: getProject or listProjects re-reads the project.\nNot here: every other field, which the ConnectWise sync owns; several projects at once (one patchProject per\nprojectId); links (linkProjectInitiatives, linkProjectPlanItems and their unlink twins).",
        "operationId": "patchProject",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project id (see listProjects).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/relationships/initiatives": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Links initiative items to one project; returns the project's relationships after the write and one errors entry\nper id not linked. initiativeItemIds come from listInitiativeItems: 1-100 per call, items of the project's\ncompany. An existing pair is a no-op, not an error; a repeated id counts once. An unknown id, another client's\nor company's item, or one you cannot see is notFound in errors while the other ids are linked: 200 even when\nevery id failed. A project ConnectWise no longer syncs (linkStatus not mapped) is validationFailed, nothing\nwritten. One transaction: a project busy with another link write is validationFailed, nothing written; retry.\nAn empty, longer or non-positive list is validationFailed, nothing written; an unreachable project is notFound.\nWhen to use: on a projectId from listProjects, to connect the project to its initiatives.\nNext: getProject re-reads the block.\nNot here: removing a link (unlinkProjectInitiatives); plan rows (linkProjectPlanItems).",
        "description": "Links initiative items to one project; returns the project's relationships after the write and one errors entry\nper id not linked. initiativeItemIds come from listInitiativeItems: 1-100 per call, items of the project's\ncompany. An existing pair is a no-op, not an error; a repeated id counts once. An unknown id, another client's\nor company's item, or one you cannot see is notFound in errors while the other ids are linked: 200 even when\nevery id failed. A project ConnectWise no longer syncs (linkStatus not mapped) is validationFailed, nothing\nwritten. One transaction: a project busy with another link write is validationFailed, nothing written; retry.\nAn empty, longer or non-positive list is validationFailed, nothing written; an unreachable project is notFound.\nWhen to use: on a projectId from listProjects, to connect the project to its initiatives.\nNext: getProject re-reads the block.\nNot here: removing a link (unlinkProjectInitiatives); plan rows (linkProjectPlanItems).",
        "operationId": "linkProjectInitiatives",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project id (see listProjects).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectInitiativesLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/relationships/initiatives/unlink": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Unlinks initiative items from one project; returns the project's relationships after the write and one errors\nentry per id not unlinked. initiativeItemIds come from listInitiativeItems or getProject's\nrelationships.initiatives: 1-100 per call; a repeated id counts once. Unlike a link, where an existing pair is a\nno-op, a pair that is not linked, or whose item you cannot see, is notFound in errors while the other ids are\nunlinked: 200 even when every id failed. Only the link goes; the item stays. Works whatever the project's\nlinkStatus. One transaction: a project busy with another link write is validationFailed, nothing written; retry.\nAn empty, longer or non-positive list is validationFailed, nothing written; an unreachable project is notFound.\nWhen to use: on a projectId from listProjects, to disconnect initiatives from the project.\nNext: getProject re-reads the block.\nNot here: adding a link (linkProjectInitiatives); deleting the item (deleteInitiativeItem).",
        "description": "Unlinks initiative items from one project; returns the project's relationships after the write and one errors\nentry per id not unlinked. initiativeItemIds come from listInitiativeItems or getProject's\nrelationships.initiatives: 1-100 per call; a repeated id counts once. Unlike a link, where an existing pair is a\nno-op, a pair that is not linked, or whose item you cannot see, is notFound in errors while the other ids are\nunlinked: 200 even when every id failed. Only the link goes; the item stays. Works whatever the project's\nlinkStatus. One transaction: a project busy with another link write is validationFailed, nothing written; retry.\nAn empty, longer or non-positive list is validationFailed, nothing written; an unreachable project is notFound.\nWhen to use: on a projectId from listProjects, to disconnect initiatives from the project.\nNext: getProject re-reads the block.\nNot here: adding a link (linkProjectInitiatives); deleting the item (deleteInitiativeItem).",
        "operationId": "unlinkProjectInitiatives",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project id (see listProjects).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectInitiativesLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/relationships/plan-items": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Links plan items to one project; returns the project's relationships after the write and one errors entry per id\nnot linked. planItemIds come from listPlanItems on a plan's first part (listPlanParts): 1-100 per call, rows of\nthe project's company. An existing pair is a no-op; a repeated id counts once. An unknown id, a row outside the\nfirst part or of a trashed plan, or one you cannot see is notFound in errors while the others are linked: 200\neven when every id failed. A project ConnectWise no longer syncs (linkStatus not mapped) is validationFailed,\nnothing written. Written one plan at a time in plan id order: a busy plan is validationFailed after the earlier\nplans were written; re-read with getProject and retry. An empty, longer or non-positive list is\nvalidationFailed, nothing written; an unreachable project is notFound.\nWhen to use: on a projectId from listProjects.\nNext: getProject re-reads the block.\nNot here: removing a link (unlinkProjectPlanItems).",
        "description": "Links plan items to one project; returns the project's relationships after the write and one errors entry per id\nnot linked. planItemIds come from listPlanItems on a plan's first part (listPlanParts): 1-100 per call, rows of\nthe project's company. An existing pair is a no-op; a repeated id counts once. An unknown id, a row outside the\nfirst part or of a trashed plan, or one you cannot see is notFound in errors while the others are linked: 200\neven when every id failed. A project ConnectWise no longer syncs (linkStatus not mapped) is validationFailed,\nnothing written. Written one plan at a time in plan id order: a busy plan is validationFailed after the earlier\nplans were written; re-read with getProject and retry. An empty, longer or non-positive list is\nvalidationFailed, nothing written; an unreachable project is notFound.\nWhen to use: on a projectId from listProjects.\nNext: getProject re-reads the block.\nNot here: removing a link (unlinkProjectPlanItems).",
        "operationId": "linkProjectPlanItems",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project id (see listProjects).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectPlanItemsLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{projectId}/relationships/plan-items/unlink": {
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Unlinks plan items from one project; returns the project's relationships after the write and one errors entry\nper id not unlinked. planItemIds come from listPlanItems or getProject's relationships.planItems: 1-100 per\ncall; a repeated id counts once. Unlike a link, where an existing pair is a no-op, a pair not linked, or whose\nrow you cannot see, is notFound in errors while the others are unlinked: 200 even when every id failed. Only the\nlink goes; the row stays. Works whatever the project's linkStatus. Written one plan at a time in plan id order:\na busy plan is validationFailed after the earlier plans were written; re-read with getProject and retry. An\nempty, longer or non-positive list is validationFailed, nothing written; an unreachable project is notFound.\nWhen to use: on a projectId from listProjects, to disconnect plan rows from the project.\nNext: getProject re-reads the block.\nNot here: adding a link (linkProjectPlanItems).",
        "description": "Unlinks plan items from one project; returns the project's relationships after the write and one errors entry\nper id not unlinked. planItemIds come from listPlanItems or getProject's relationships.planItems: 1-100 per\ncall; a repeated id counts once. Unlike a link, where an existing pair is a no-op, a pair not linked, or whose\nrow you cannot see, is notFound in errors while the others are unlinked: 200 even when every id failed. Only the\nlink goes; the row stays. Works whatever the project's linkStatus. Written one plan at a time in plan id order:\na busy plan is validationFailed after the earlier plans were written; re-read with getProject and retry. An\nempty, longer or non-positive list is validationFailed, nothing written; an unreachable project is notFound.\nWhen to use: on a projectId from listProjects, to disconnect plan rows from the project.\nNext: getProject re-reads the block.\nNot here: adding a link (linkProjectPlanItems).",
        "operationId": "unlinkProjectPlanItems",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project id (see listProjects).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectPlanItemsLinkInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRelationshipsLinkResponseExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/columns": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Lists the column definitions of the caller's client Projects module, in the module's own column order: the\nstandard columns (name, status, type, board, manager, the dates and hours, ...) and the custom PSA-field\ncolumns. The set is fixed by the ConnectWise sync; no column operation writes it.\nWhen to use: to learn what a custom value in a project's columnValues means - a custom column's\ncustomColumnTypeEnum says how to read it.\nNext: returns the columnId that appears in a project's columnValues.\nNot here: the projects themselves (listProjects).",
        "description": "Lists the column definitions of the caller's client Projects module, in the module's own column order: the\nstandard columns (name, status, type, board, manager, the dates and hours, ...) and the custom PSA-field\ncolumns. The set is fixed by the ConnectWise sync; no column operation writes it.\nWhen to use: to learn what a custom value in a project's columnValues means - a custom column's\ncustomColumnTypeEnum says how to read it.\nNext: returns the columnId that appears in a project's columnValues.\nNot here: the projects themselves (listProjects).",
        "operationId": "listProjectColumns",
        "parameters": [
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectColumnResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/proposals": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "Lists the proposals in the companies the caller can see, paged (25 by default, at most 100), with filters, sort\nand field selection. A proposal is a PSA opportunity the sync mirrors read-only; internal and closed ones are\nlisted, never one the sync no longer keeps (integration removed, sync switched off, company no longer mapped, or\noutside the sync settings). Filters: companyId (listCompanies); statusId, stageId, typeId, ownerId, contactId\n(PSA string ids); integrationId (listIntegrations); initiativeItemId (403 without Initiatives_Items Read),\nplanItemId, planId; isInternal, isClosed, baseStatus; inclusive date bounds. view=Full adds relationships. 403\nwhile the Proposals module is off or not assigned to the caller.\nWhen to use: proposals are one flat client-wide list; no report or part id.\nNext: returns the proposalId getProposal takes.\nNot here: the product lines (getProposal); a project's proposal ref (listProjects), whose id is not a\nproposalId.",
        "description": "Lists the proposals in the companies the caller can see, paged (25 by default, at most 100), with filters, sort\nand field selection. A proposal is a PSA opportunity the sync mirrors read-only; internal and closed ones are\nlisted, never one the sync no longer keeps (integration removed, sync switched off, company no longer mapped, or\noutside the sync settings). Filters: companyId (listCompanies); statusId, stageId, typeId, ownerId, contactId\n(PSA string ids); integrationId (listIntegrations); initiativeItemId (403 without Initiatives_Items Read),\nplanItemId, planId; isInternal, isClosed, baseStatus; inclusive date bounds. view=Full adds relationships. 403\nwhile the Proposals module is off or not assigned to the caller.\nWhen to use: proposals are one flat client-wide list; no report or part id.\nNext: returns the proposalId getProposal takes.\nNot here: the product lines (getProposal); a project's proposal ref (listProjects), whose id is not a\nproposalId.",
        "operationId": "listProposals",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Proposals whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Proposals whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Proposals whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Proposals whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Proposals whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Proposals whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Proposals whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Proposals whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the proposal with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the proposal with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the proposals with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the proposals with these ids."
            }
          },
          {
            "name": "CompanyId",
            "in": "query",
            "description": "Proposals belonging to the company with this id (see listCompanies).",
            "schema": {
              "type": "integer",
              "description": "Proposals belonging to the company with this id (see listCompanies).",
              "format": "int32"
            }
          },
          {
            "name": "CompanyIdIn",
            "in": "query",
            "description": "Proposals belonging to any of the companies with these ids (see listCompanies).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Proposals belonging to any of the companies with these ids (see listCompanies)."
            }
          },
          {
            "name": "StatusId",
            "in": "query",
            "description": "Proposals with this PSA status: the PSA's own string id, as a proposal's status.id returns it.",
            "schema": {
              "type": "string",
              "description": "Proposals with this PSA status: the PSA's own string id, as a proposal's status.id returns it."
            }
          },
          {
            "name": "StatusIdIn",
            "in": "query",
            "description": "Proposals with any of these PSA statuses (PSA string ids, as proposals' status.id return them).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Proposals with any of these PSA statuses (PSA string ids, as proposals' status.id return them)."
            }
          },
          {
            "name": "StageId",
            "in": "query",
            "description": "Proposals in this PSA pipeline stage: the PSA's own string id, as a proposal's stage.id returns it. Proposals without a stage are not matched.",
            "schema": {
              "type": "string",
              "description": "Proposals in this PSA pipeline stage: the PSA's own string id, as a proposal's stage.id returns it. Proposals without a stage are not matched."
            }
          },
          {
            "name": "StageIdIn",
            "in": "query",
            "description": "Proposals in any of these PSA pipeline stages (PSA string ids, as proposals' stage.id return them). Proposals without a stage are not matched.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Proposals in any of these PSA pipeline stages (PSA string ids, as proposals' stage.id return them). Proposals without a stage are not matched."
            }
          },
          {
            "name": "TypeId",
            "in": "query",
            "description": "Proposals of this PSA opportunity type: the PSA's own string id, as a proposal's type.id returns it. Proposals without a type are not matched.",
            "schema": {
              "type": "string",
              "description": "Proposals of this PSA opportunity type: the PSA's own string id, as a proposal's type.id returns it. Proposals without a type are not matched."
            }
          },
          {
            "name": "TypeIdIn",
            "in": "query",
            "description": "Proposals of any of these PSA opportunity types (PSA string ids, as proposals' type.id return them). Proposals without a type are not matched.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Proposals of any of these PSA opportunity types (PSA string ids, as proposals' type.id return them). Proposals without a type are not matched."
            }
          },
          {
            "name": "OwnerId",
            "in": "query",
            "description": "Proposals owned by this PSA member (the sales rep): the PSA's own string id, as a proposal's owner.id returns it; not a user id. Proposals without an owner are not matched.",
            "schema": {
              "type": "string",
              "description": "Proposals owned by this PSA member (the sales rep): the PSA's own string id, as a proposal's owner.id returns it; not a user id. Proposals without an owner are not matched."
            }
          },
          {
            "name": "OwnerIdIn",
            "in": "query",
            "description": "Proposals owned by any of these PSA members (PSA string ids, as proposals' owner.id return them; not user ids). Proposals without an owner are not matched.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Proposals owned by any of these PSA members (PSA string ids, as proposals' owner.id return them; not user ids). Proposals without an owner are not matched."
            }
          },
          {
            "name": "ContactId",
            "in": "query",
            "description": "Proposals with this PSA contact: the PSA's own string id, as a proposal's contact.id returns it. Proposals without a contact are not matched.",
            "schema": {
              "type": "string",
              "description": "Proposals with this PSA contact: the PSA's own string id, as a proposal's contact.id returns it. Proposals without a contact are not matched."
            }
          },
          {
            "name": "ContactIdIn",
            "in": "query",
            "description": "Proposals with any of these PSA contacts (PSA string ids, as proposals' contact.id return them). Proposals without a contact are not matched.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Proposals with any of these PSA contacts (PSA string ids, as proposals' contact.id return them). Proposals without a contact are not matched."
            }
          },
          {
            "name": "IntegrationId",
            "in": "query",
            "description": "Proposals synced through the PSA integration with this id (see listIntegrations).",
            "schema": {
              "type": "integer",
              "description": "Proposals synced through the PSA integration with this id (see listIntegrations).",
              "format": "int32"
            }
          },
          {
            "name": "IntegrationIdIn",
            "in": "query",
            "description": "Proposals synced through any of the PSA integrations with these ids (see listIntegrations).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Proposals synced through any of the PSA integrations with these ids (see listIntegrations)."
            }
          },
          {
            "name": "InitiativeItemId",
            "in": "query",
            "description": "Proposals linked to the initiative item with this id (see listInitiativeItems; the ids a proposal's relationships.initiativeItems return). Requires Initiatives_Items Read: 403 without it. A link to an item the caller cannot see never matches.",
            "schema": {
              "type": "integer",
              "description": "Proposals linked to the initiative item with this id (see listInitiativeItems; the ids a proposal's relationships.initiativeItems return). Requires Initiatives_Items Read: 403 without it. A link to an item the caller cannot see never matches.",
              "format": "int32"
            }
          },
          {
            "name": "InitiativeItemIdIn",
            "in": "query",
            "description": "Proposals linked to any of the initiative items with these ids (see listInitiativeItems). Requires Initiatives_Items Read: 403 without it. A link to an item the caller cannot see never matches.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Proposals linked to any of the initiative items with these ids (see listInitiativeItems). Requires Initiatives_Items Read: 403 without it. A link to an item the caller cannot see never matches."
            }
          },
          {
            "name": "PlanItemId",
            "in": "query",
            "description": "Proposals linked to the plan item with this id (the ids a proposal's relationships.planItems return). A link to an item of a plan the caller cannot read, or of a trashed plan, never matches.",
            "schema": {
              "type": "integer",
              "description": "Proposals linked to the plan item with this id (the ids a proposal's relationships.planItems return). A link to an item of a plan the caller cannot read, or of a trashed plan, never matches.",
              "format": "int32"
            }
          },
          {
            "name": "PlanItemIdIn",
            "in": "query",
            "description": "Proposals linked to any of the plan items with these ids. A link to an item of a plan the caller cannot read, or of a trashed plan, never matches.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Proposals linked to any of the plan items with these ids. A link to an item of a plan the caller cannot read, or of a trashed plan, never matches."
            }
          },
          {
            "name": "PlanId",
            "in": "query",
            "description": "Proposals linked to at least one item of the plan with this id (see listPlans). Plans themselves are never linked to a proposal. A plan the caller cannot read, or a trashed one, never matches.",
            "schema": {
              "type": "integer",
              "description": "Proposals linked to at least one item of the plan with this id (see listPlans). Plans themselves are never linked to a proposal. A plan the caller cannot read, or a trashed one, never matches.",
              "format": "int32"
            }
          },
          {
            "name": "PlanIdIn",
            "in": "query",
            "description": "Proposals linked to at least one item of any of the plans with these ids (see listPlans). A plan the caller cannot read, or a trashed one, never matches.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Proposals linked to at least one item of any of the plans with these ids (see listPlans). A plan the caller cannot read, or a trashed one, never matches."
            }
          },
          {
            "name": "IsInternal",
            "in": "query",
            "description": "Proposals whose own Internal flag (isInternal) has this value. The status and stage Internal marks are not considered, so isInternal=false still returns proposals internal through their status or stage.",
            "schema": {
              "type": "boolean",
              "description": "Proposals whose own Internal flag (isInternal) has this value. The status and stage Internal marks are not considered, so isInternal=false still returns proposals internal through their status or stage."
            }
          },
          {
            "name": "IsClosed",
            "in": "query",
            "description": "true: only proposals whose PSA status is a closed one; false: only the others. Independent of baseStatus.",
            "schema": {
              "type": "boolean",
              "description": "true: only proposals whose PSA status is a closed one; false: only the others. Independent of baseStatus."
            }
          },
          {
            "name": "BaseStatus",
            "in": "query",
            "description": "Proposals whose status means this to StrategyOverview: open (no won or lost outcome, whether or not the status is a closed one), accepted (won) or declined (lost). Filter the proposals that are not closed with isClosed=false.",
            "schema": {
              "enum": [
                "open",
                "accepted",
                "declined"
              ],
              "type": "string",
              "description": "Proposals whose status means this to StrategyOverview: open (no won or lost outcome, whether or not the status is a closed one), accepted (won) or declined (lost). Filter the proposals that are not closed with isClosed=false."
            }
          },
          {
            "name": "BaseStatusIn",
            "in": "query",
            "description": "Proposals whose status means any of these to StrategyOverview: open (no won or lost outcome, whether or not the status is a closed one), accepted (won), declined (lost). Filter the proposals that are not closed with isClosed=false.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "open",
                  "accepted",
                  "declined"
                ],
                "type": "string"
              },
              "description": "Proposals whose status means any of these to StrategyOverview: open (no won or lost outcome, whether or not the status is a closed one), accepted (won), declined (lost). Filter the proposals that are not closed with isClosed=false."
            }
          },
          {
            "name": "ExpectedCloseDateAfter",
            "in": "query",
            "description": "Proposals whose expected close date is on or after this date. Proposals with no expected close date are not matched.",
            "schema": {
              "type": "string",
              "description": "Proposals whose expected close date is on or after this date. Proposals with no expected close date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "ExpectedCloseDateBefore",
            "in": "query",
            "description": "Proposals whose expected close date is on or before this date. Proposals with no expected close date are not matched.",
            "schema": {
              "type": "string",
              "description": "Proposals whose expected close date is on or before this date. Proposals with no expected close date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "EnteredDateAfter",
            "in": "query",
            "description": "Proposals entered in the PSA on or after this instant (UTC). Proposals with no entered date are not matched.",
            "schema": {
              "type": "string",
              "description": "Proposals entered in the PSA on or after this instant (UTC). Proposals with no entered date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "EnteredDateBefore",
            "in": "query",
            "description": "Proposals entered in the PSA on or before this instant (UTC). Proposals with no entered date are not matched.",
            "schema": {
              "type": "string",
              "description": "Proposals entered in the PSA on or before this instant (UTC). Proposals with no entered date are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedAtAfter",
            "in": "query",
            "description": "Proposals first stored in StrategyOverview on or after this instant (UTC). Proposals with no createdAt are not matched.",
            "schema": {
              "type": "string",
              "description": "Proposals first stored in StrategyOverview on or after this instant (UTC). Proposals with no createdAt are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedAtBefore",
            "in": "query",
            "description": "Proposals first stored in StrategyOverview on or before this instant (UTC). Proposals with no createdAt are not matched.",
            "schema": {
              "type": "string",
              "description": "Proposals first stored in StrategyOverview on or before this instant (UTC). Proposals with no createdAt are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedAtAfter",
            "in": "query",
            "description": "Proposals last updated in StrategyOverview on or after this instant (UTC). A proposal never updated since it was stored has no updatedAt and is never matched: use createdAtAfter as well to catch new ones.",
            "schema": {
              "type": "string",
              "description": "Proposals last updated in StrategyOverview on or after this instant (UTC). A proposal never updated since it was stored has no updatedAt and is never matched: use createdAtAfter as well to catch new ones.",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedAtBefore",
            "in": "query",
            "description": "Proposals last updated in StrategyOverview on or before this instant (UTC). Proposals never updated since they were stored (no updatedAt) are not matched.",
            "schema": {
              "type": "string",
              "description": "Proposals last updated in StrategyOverview on or before this instant (UTC). Proposals never updated since they were stored (no updatedAt) are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for proposals. Allowed values: Name (the default), Amount, Probability,\nExpectedCloseDate, EnteredDate, CreatedAt, UpdatedAt. Ties break by id following sortDir; a proposal without the\nsort value comes first ascending and last descending. The company name is never a sort key.",
            "schema": {
              "enum": [
                "name",
                "amount",
                "probability",
                "expectedCloseDate",
                "enteredDate",
                "createdAt",
                "updatedAt"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for proposals. Allowed values: Name (the default), Amount, Probability,\nExpectedCloseDate, EnteredDate, CreatedAt, UpdatedAt. Ties break by id following sortDir; a proposal without the\nsort value comes first ascending and last descending. The company name is never a sort key."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'; a selected status or stage carries its isInternal. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "company",
                  "status",
                  "stage",
                  "type",
                  "baseStatus",
                  "isClosed",
                  "amount",
                  "recurringAmount",
                  "probability",
                  "expectedCloseDate",
                  "owner",
                  "isInternal",
                  "contact",
                  "enteredDate",
                  "integratedSystemId",
                  "integrationId",
                  "lastSyncedAt",
                  "createdAt",
                  "updatedAt",
                  "relationships"
                ],
                "type": "string",
                "description": "Selectable response fields of a proposal (used by the fields query parameter). Allowed values: Id, Name, Company,\nStatus, Stage, Type, BaseStatus, IsClosed, Amount, RecurringAmount, Probability, ExpectedCloseDate, Owner,\nIsInternal, Contact, EnteredDate, IntegratedSystemId, IntegrationId, LastSyncedAt, CreatedAt, UpdatedAt,\nRelationships. The product lines are not selectable: getProposal returns them."
              },
              "description": "Exact fields to return. When set, overrides 'view'; a selected status or stage carries its isInternal. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/proposals/{proposalId}": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "Returns one proposal of the caller's client by id, always in the Full shape (with its linked initiative items and\nplan items), with its product lines in the PSA's own line order. A proposal is a PSA opportunity the sync\nmirrors read-only. A proposal of another client, one in a company the caller cannot see, one the sync no longer\nkeeps (integration removed, sync switched off, company no longer mapped, or outside the sync settings) and an id\nthat matches nothing are all reported as notFound. 403 while the Proposals module is off for the client or the\ncaller is not assigned to it.\nWhen to use: on a proposalId from listProposals.\nNext: listProposals with companyId lists the company's other proposals.\nNot here: changing a proposal, which only the PSA sync does; a project's proposal ref (getProject),\nwhose id is not a proposalId.",
        "description": "Returns one proposal of the caller's client by id, always in the Full shape (with its linked initiative items and\nplan items), with its product lines in the PSA's own line order. A proposal is a PSA opportunity the sync\nmirrors read-only. A proposal of another client, one in a company the caller cannot see, one the sync no longer\nkeeps (integration removed, sync switched off, company no longer mapped, or outside the sync settings) and an id\nthat matches nothing are all reported as notFound. 403 while the Proposals module is off for the client or the\ncaller is not assigned to it.\nWhen to use: on a proposalId from listProposals.\nNext: listProposals with companyId lists the company's other proposals.\nNot here: changing a proposal, which only the PSA sync does; a project's proposal ref (getProject),\nwhose id is not a proposalId.",
        "operationId": "getProposal",
        "parameters": [
          {
            "name": "proposalId",
            "in": "path",
            "description": "Proposal id (see listProposals).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/initiatives/items": {
      "get": {
        "tags": [
          "ReportInitiatives"
        ],
        "summary": "Lists a report Initiatives part's items in report order — live on a draft, frozen after completion.\nWhen to use: partId is a listReportParts part with typeEnum \"initiatives\"; a report with no such\npart answers notFound. Items are narrowed to the report's company (no companyId filter); every\nother listInitiativeItems filter works, live or frozen, including createdAtAfter/Before and\nupdatedAtAfter/Before (inclusive, UTC) — a never-edited item has updatedAt null and matches NO\nupdatedAt bound, so poll with createdAtAfter too. assigneeId comes from listUsers (string GUID),\ntagId from listReportInitiativeTags, statusId / priorityId from listReportInitiativeColumns options,\ngoalId from listGoals.\nA filter on a hidden column is REFUSED with validationFailed.\nNext: returns the itemId every other report-scope item operation takes.\nNot here: sorting, even by UpdatedAt — the order is the report's; and the same items module-wide\nvia listInitiativeItems, across every company you see.",
        "description": "Lists a report Initiatives part's items in report order — live on a draft, frozen after completion.\nWhen to use: partId is a listReportParts part with typeEnum \"initiatives\"; a report with no such\npart answers notFound. Items are narrowed to the report's company (no companyId filter); every\nother listInitiativeItems filter works, live or frozen, including createdAtAfter/Before and\nupdatedAtAfter/Before (inclusive, UTC) — a never-edited item has updatedAt null and matches NO\nupdatedAt bound, so poll with createdAtAfter too. assigneeId comes from listUsers (string GUID),\ntagId from listReportInitiativeTags, statusId / priorityId from listReportInitiativeColumns options,\ngoalId from listGoals.\nA filter on a hidden column is REFUSED with validationFailed.\nNext: returns the itemId every other report-scope item operation takes.\nNot here: sorting, even by UpdatedAt — the order is the report's; and the same items module-wide\nvia listInitiativeItems, across every company you see.",
        "operationId": "listReportInitiativeItems",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Items whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Items whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Items whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Items whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Items whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Items whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Items whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Items whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the item with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the item with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the items with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items with these ids."
            }
          },
          {
            "name": "Month",
            "in": "query",
            "description": "Items whose budget month is this value (1-12).",
            "schema": {
              "type": "integer",
              "description": "Items whose budget month is this value (1-12).",
              "format": "int32"
            }
          },
          {
            "name": "Year",
            "in": "query",
            "description": "Items whose budget year is this value.",
            "schema": {
              "type": "integer",
              "description": "Items whose budget year is this value.",
              "format": "int32"
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "description": "Items placed at the site with this id. Sites have no listing operation — read the id off an item's site object.",
            "schema": {
              "type": "integer",
              "description": "Items placed at the site with this id. Sites have no listing operation — read the id off an item's site object.",
              "format": "int32"
            }
          },
          {
            "name": "SiteIdIn",
            "in": "query",
            "description": "Items placed at any of the sites with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items placed at any of the sites with these ids."
            }
          },
          {
            "name": "AssigneeId",
            "in": "query",
            "description": "Items assigned to the user with this id (a string GUID; see listUsers).",
            "schema": {
              "type": "string",
              "description": "Items assigned to the user with this id (a string GUID; see listUsers)."
            }
          },
          {
            "name": "AssigneeIdIn",
            "in": "query",
            "description": "Items assigned to any of the users with these ids (string GUIDs; see listUsers).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Items assigned to any of the users with these ids (string GUIDs; see listUsers)."
            }
          },
          {
            "name": "TagId",
            "in": "query",
            "description": "Items carrying the tag with this id (see listInitiativeTags).",
            "schema": {
              "type": "integer",
              "description": "Items carrying the tag with this id (see listInitiativeTags).",
              "format": "int32"
            }
          },
          {
            "name": "TagIdIn",
            "in": "query",
            "description": "Items carrying any of the tags with these ids (see listInitiativeTags).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items carrying any of the tags with these ids (see listInitiativeTags)."
            }
          },
          {
            "name": "StatusId",
            "in": "query",
            "description": "Items with this status. A string GUID from the Status column's options (see listInitiativeColumns).",
            "schema": {
              "type": "string",
              "description": "Items with this status. A string GUID from the Status column's options (see listInitiativeColumns)."
            }
          },
          {
            "name": "StatusIdIn",
            "in": "query",
            "description": "Items with any of these statuses (string GUIDs from the Status column's options).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Items with any of these statuses (string GUIDs from the Status column's options)."
            }
          },
          {
            "name": "PriorityId",
            "in": "query",
            "description": "Items with this priority. A string GUID from the Priority column's options (see listInitiativeColumns).",
            "schema": {
              "type": "string",
              "description": "Items with this priority. A string GUID from the Priority column's options (see listInitiativeColumns)."
            }
          },
          {
            "name": "PriorityIdIn",
            "in": "query",
            "description": "Items with any of these priorities (string GUIDs from the Priority column's options).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Items with any of these priorities (string GUIDs from the Priority column's options)."
            }
          },
          {
            "name": "CreatedAtAfter",
            "in": "query",
            "description": "Items created on or after this instant (UTC).",
            "schema": {
              "type": "string",
              "description": "Items created on or after this instant (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "CreatedAtBefore",
            "in": "query",
            "description": "Items created on or before this instant (UTC).",
            "schema": {
              "type": "string",
              "description": "Items created on or before this instant (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedAtAfter",
            "in": "query",
            "description": "Items last updated on or after this instant (UTC). A never-modified item has no updatedAt and is never matched — use createdAtAfter as well to catch new items.",
            "schema": {
              "type": "string",
              "description": "Items last updated on or after this instant (UTC). A never-modified item has no updatedAt and is never matched — use createdAtAfter as well to catch new items.",
              "format": "date-time"
            }
          },
          {
            "name": "UpdatedAtBefore",
            "in": "query",
            "description": "Items last updated on or before this instant (UTC). Never-modified items (updatedAt null) are not matched.",
            "schema": {
              "type": "string",
              "description": "Items last updated on or before this instant (UTC). Never-modified items (updatedAt null) are not matched.",
              "format": "date-time"
            }
          },
          {
            "name": "GoalId",
            "in": "query",
            "description": "Items linked to the goal with this id (see listGoals). Only goals you can see count.",
            "schema": {
              "type": "integer",
              "description": "Items linked to the goal with this id (see listGoals). Only goals you can see count.",
              "format": "int32"
            }
          },
          {
            "name": "GoalIdIn",
            "in": "query",
            "description": "Items linked to any of the goals with these ids (see listGoals).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items linked to any of the goals with these ids (see listGoals)."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "sortOrder",
                  "company",
                  "status",
                  "priority",
                  "month",
                  "year",
                  "tags",
                  "summary",
                  "nextSteps",
                  "budgetEstimate",
                  "oneTimeBudget",
                  "itemsBudget",
                  "laborBudget",
                  "partsBudget",
                  "recurringBudget",
                  "recurringPeriod",
                  "recurringTotal",
                  "quantity",
                  "effectiveDate",
                  "cancellationDate",
                  "site",
                  "assignee",
                  "contentLength",
                  "columnValues",
                  "createdAt",
                  "updatedAt",
                  "goals",
                  "relationships"
                ],
                "type": "string",
                "description": "Selectable response fields of an initiative item (used by the fields query parameter). The item's\nHTML content is deliberately absent: it is served by its own operation, and only its length\n(ContentLength) is selectable here."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ReportInitiatives"
        ],
        "summary": "Creates one initiative item in a report's Initiatives part, returned in the Full shape.\nDRAFT ONLY: a completed or archived report is frozen, so a create against one is rejected with\nvalidationFailed and nothing is written. The body carries NO companyId — a report renders exactly\none company and the item always lands in it. Otherwise as createInitiativeItem: it lands at the\nEND of the manual order, statusId / priorityId are option GUIDs from listReportInitiativeColumns\nand omitting either takes that column's isDefault, siteId must be an ACTIVE site of that company,\nand in columnValues an unknown columnId and a hidden one answer the SAME notFound. An\nIdempotency-Key makes a retry safe.\nWhen to use: report scope, on a draft report; HTML content goes through\nupdateReportInitiativeItemContent afterwards, never in this body.\nNext: returns the itemId the other three report-scope item operations take.\nNot here: copying an existing item, which copyReportInitiativeItem does here.",
        "description": "Creates one initiative item in a report's Initiatives part, returned in the Full shape.\nDRAFT ONLY: a completed or archived report is frozen, so a create against one is rejected with\nvalidationFailed and nothing is written. The body carries NO companyId — a report renders exactly\none company and the item always lands in it. Otherwise as createInitiativeItem: it lands at the\nEND of the manual order, statusId / priorityId are option GUIDs from listReportInitiativeColumns\nand omitting either takes that column's isDefault, siteId must be an ACTIVE site of that company,\nand in columnValues an unknown columnId and a hidden one answer the SAME notFound. An\nIdempotency-Key makes a retry safe.\nWhen to use: report scope, on a draft report; HTML content goes through\nupdateReportInitiativeItemContent afterwards, never in this body.\nNext: returns the itemId the other three report-scope item operations take.\nNot here: copying an existing item, which copyReportInitiativeItem does here.",
        "operationId": "createReportInitiativeItem",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportInitiativeItemCreateResource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "ReportInitiatives"
        ],
        "summary": "Applies ONE JSON Patch to several items of a report's Initiatives part by explicit entityIds,\nanswering a per-item envelope: items holds the resources that WERE patched, errors one per id that\nwas not — notFound for an id unreachable here, validationFailed for one the write rejected. Every\nid is in exactly one. Wrapper: application/json; only the nested patch is RFC 6902. An empty\nentityIds list is REFUSED, never \"every item\", and it caps at 100 ids.\nDRAFT ONLY: a frozen report rejects a bulk patch with validationFailed. Validated as a whole\nfirst, so one unwritable path writes nothing: the paths are patchReportInitiativeItem's, /companyId\nis REFUSED here (a report renders one company), /sortOrder stays refused, and a hidden column is\nnotFound.\nWhen to use: report scope, one patch over itemIds from listReportInitiativeItems.\nNot here: one item — patchReportInitiativeItem answers the resource itself; and the module-wide\nbatch, where /companyId IS writable.",
        "description": "Applies ONE JSON Patch to several items of a report's Initiatives part by explicit entityIds,\nanswering a per-item envelope: items holds the resources that WERE patched, errors one per id that\nwas not — notFound for an id unreachable here, validationFailed for one the write rejected. Every\nid is in exactly one. Wrapper: application/json; only the nested patch is RFC 6902. An empty\nentityIds list is REFUSED, never \"every item\", and it caps at 100 ids.\nDRAFT ONLY: a frozen report rejects a bulk patch with validationFailed. Validated as a whole\nfirst, so one unwritable path writes nothing: the paths are patchReportInitiativeItem's, /companyId\nis REFUSED here (a report renders one company), /sortOrder stays refused, and a hidden column is\nnotFound.\nWhen to use: report scope, one patch over itemIds from listReportInitiativeItems.\nNot here: one item — patchReportInitiativeItem answers the resource itself; and the module-wide\nbatch, where /companyId IS writable.",
        "operationId": "patchReportInitiativeItems",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeItemsBulkPatchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemsBulkPatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/initiatives/items/{itemId}": {
      "get": {
        "tags": [
          "ReportInitiatives"
        ],
        "summary": "Returns one initiative item of a report's Initiatives part by id, always in the Full shape. An\nitem outside the report's company, an item of another client and an unknown id are all reported as\nnotFound. On a completed or archived report this serves the frozen snapshot, so it can differ from\nwhat getInitiativeItem returns for the same id — that is the point of the two families.\nWhen to use: report scope, on an itemId from listReportInitiativeItems.\nNot here: the item's HTML content, which getReportInitiativeItemContent serves; and the same\nitem read module-wide, which getInitiativeItem serves against live data whatever the report's\nstatus. The two are never interchangeable.",
        "description": "Returns one initiative item of a report's Initiatives part by id, always in the Full shape. An\nitem outside the report's company, an item of another client and an unknown id are all reported as\nnotFound. On a completed or archived report this serves the frozen snapshot, so it can differ from\nwhat getInitiativeItem returns for the same id — that is the point of the two families.\nWhen to use: report scope, on an itemId from listReportInitiativeItems.\nNot here: the item's HTML content, which getReportInitiativeItemContent serves; and the same\nitem read module-wide, which getInitiativeItem serves against live data whatever the report's\nstatus. The two are never interchangeable.",
        "operationId": "getReportInitiativeItem",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "ReportInitiatives"
        ],
        "summary": "Patches one item of a report's Initiatives part, returned in the Full shape.\nDRAFT ONLY: a completed or archived report is frozen; a patch against one is rejected with\nvalidationFailed. The writable paths are patchInitiativeItem's MINUS the company: /companyId is\nread-only here — a report renders exactly one company, so moving an item out of it is not a report\noperation. Any other path — /sortOrder, /contentLength, /id — is rejected and nothing is written.\n/tagsIds is a full REPLACEMENT set; on /columns/{columnId} a remove equals a replace with null,\nand an unknown columnId and a hidden one answer the SAME notFound.\nWhen to use: report scope, on an itemId from listReportInitiativeItems, on a draft report.\nNot here: creating an item and writing its content, which\ncreateReportInitiativeItem and updateReportInitiativeItemContent do\nhere; and copying, reordering and bulk-patching, this scope's three structure operations.",
        "description": "Patches one item of a report's Initiatives part, returned in the Full shape.\nDRAFT ONLY: a completed or archived report is frozen; a patch against one is rejected with\nvalidationFailed. The writable paths are patchInitiativeItem's MINUS the company: /companyId is\nread-only here — a report renders exactly one company, so moving an item out of it is not a report\noperation. Any other path — /sortOrder, /contentLength, /id — is rejected and nothing is written.\n/tagsIds is a full REPLACEMENT set; on /columns/{columnId} a remove equals a replace with null,\nand an unknown columnId and a hidden one answer the SAME notFound.\nWhen to use: report scope, on an itemId from listReportInitiativeItems, on a draft report.\nNot here: creating an item and writing its content, which\ncreateReportInitiativeItem and updateReportInitiativeItemContent do\nhere; and copying, reordering and bulk-patching, this scope's three structure operations.",
        "operationId": "patchReportInitiativeItem",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/initiatives/items/{itemId}/content": {
      "get": {
        "tags": [
          "ReportInitiatives"
        ],
        "summary": "Returns the HTML content of one initiative item of a report's Initiatives part — the long-form body\nthat no item projection carries. On a completed or archived report this is the content frozen at\ncompletion time, and this READ answers on every report status.\nWhen to use: report scope, on an itemId from listReportInitiativeItems, whose contentLength says how\nlarge the string this returns will be.\nNext: updateReportInitiativeItemContent replaces this same string on a DRAFT report; the module-wide\nupdateInitiativeItemContent writes the same live rows while the report is a draft.\nNot here: the same content read module-wide, which getInitiativeItemContent serves from live data\nwhatever the report's status. Images EMBEDDED in the HTML are not retrievable through this API\neither: v1 publishes no image operation, so an img tag in the content points at something an\nexternal caller cannot fetch. The text itself is complete.",
        "description": "Returns the HTML content of one initiative item of a report's Initiatives part — the long-form body\nthat no item projection carries. On a completed or archived report this is the content frozen at\ncompletion time, and this READ answers on every report status.\nWhen to use: report scope, on an itemId from listReportInitiativeItems, whose contentLength says how\nlarge the string this returns will be.\nNext: updateReportInitiativeItemContent replaces this same string on a DRAFT report; the module-wide\nupdateInitiativeItemContent writes the same live rows while the report is a draft.\nNot here: the same content read module-wide, which getInitiativeItemContent serves from live data\nwhatever the report's status. Images EMBEDDED in the HTML are not retrievable through this API\neither: v1 publishes no image operation, so an img tag in the content points at something an\nexternal caller cannot fetch. The text itself is complete.",
        "operationId": "getReportInitiativeItemContent",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemContentModelExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ReportInitiatives"
        ],
        "summary": "Replaces the HTML content of one item of a report's Initiatives part and returns the stored\ncontent. The write is a full REPLACEMENT — the body carries the whole string, not merged into\nwhat is there — and content is writable through neither createReportInitiativeItem nor\npatchReportInitiativeItem, so this is its only write path here.\nDRAFT ONLY: a completed or archived report is frozen; a write is rejected with validationFailed\nand nothing is written. Reading stays available on every report status through\ngetReportInitiativeItemContent.\nWhen to use: report scope, on an itemId from listReportInitiativeItems, on a draft report; the\nsame live string is writable module-wide with updateInitiativeItemContent.\nNot here: images embedded in the HTML can be neither uploaded nor retrieved here — v1 publishes\nno image operation, so content naming an img the caller did not place through the web\napplication renders against something it cannot fetch.",
        "description": "Replaces the HTML content of one item of a report's Initiatives part and returns the stored\ncontent. The write is a full REPLACEMENT — the body carries the whole string, not merged into\nwhat is there — and content is writable through neither createReportInitiativeItem nor\npatchReportInitiativeItem, so this is its only write path here.\nDRAFT ONLY: a completed or archived report is frozen; a write is rejected with validationFailed\nand nothing is written. Reading stays available on every report status through\ngetReportInitiativeItemContent.\nWhen to use: report scope, on an itemId from listReportInitiativeItems, on a draft report; the\nsame live string is writable module-wide with updateInitiativeItemContent.\nNot here: images embedded in the HTML can be neither uploaded nor retrieved here — v1 publishes\nno image operation, so content naming an img the caller did not place through the web\napplication renders against something it cannot fetch.",
        "operationId": "updateReportInitiativeItemContent",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeItemContentModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemContentModelExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/initiatives/items/{itemId}/copy": {
      "post": {
        "tags": [
          "ReportInitiatives"
        ],
        "summary": "Duplicates one initiative item of a report's Initiatives part, returning the NEW item in the Full\nshape. No request body: everything comes from the source. The name is the source's prefixed with\n\"Copy of \" (truncated to 255 characters), the copy lands DIRECTLY after the source in the report's\norder, its custom column values, tag assignments and HTML content come across, and it lands in the\nreport's own company.\nDRAFT ONLY: a frozen report — completed or archived — rejects a copy with validationFailed, writing\nnothing. An item outside the report's company, one of another client and an unknown id are all\nnotFound. An Idempotency-Key makes a retry safe.\nWhen to use: report scope, on an itemId from listReportInitiativeItems, on a draft report, to seed\na new item without restating its body to createReportInitiativeItem.\nNext: returns the NEW itemId — not the source's.\nNot here: the same copy module-wide, which copyInitiativeItem does whatever the report's status.",
        "description": "Duplicates one initiative item of a report's Initiatives part, returning the NEW item in the Full\nshape. No request body: everything comes from the source. The name is the source's prefixed with\n\"Copy of \" (truncated to 255 characters), the copy lands DIRECTLY after the source in the report's\norder, its custom column values, tag assignments and HTML content come across, and it lands in the\nreport's own company.\nDRAFT ONLY: a frozen report — completed or archived — rejects a copy with validationFailed, writing\nnothing. An item outside the report's company, one of another client and an unknown id are all\nnotFound. An Idempotency-Key makes a retry safe.\nWhen to use: report scope, on an itemId from listReportInitiativeItems, on a draft report, to seed\na new item without restating its body to createReportInitiativeItem.\nNext: returns the NEW itemId — not the source's.\nNot here: the same copy module-wide, which copyInitiativeItem does whatever the report's status.",
        "operationId": "copyReportInitiativeItem",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/initiatives/items/{itemId}/sort-order": {
      "put": {
        "tags": [
          "ReportInitiatives"
        ],
        "summary": "Moves one initiative item inside a report's Initiatives part order, returning it in the Full shape.\nafterItemId is the item the moved item lands DIRECTLY after; null, 0 or an omitted property all mean\nthe FIRST position, and anchoring an item on itself is a no-op. There is no absolute index. The\nanchor must be an item of the REPORT, unlike the module operation where any company you see is a\nlegitimate anchor; either id you cannot reach here is notFound with nothing moved.\nDRAFT ONLY: a frozen report — completed or archived — rejects a move with validationFailed. The\norder is ONE client-wide sequence the report renders a subsequence of, so a move here changes what\nevery report of that company shows.\nWhen to use: report scope, on itemIds from listReportInitiativeItems, whose order this writes.\nNot here: /sortOrder stays REFUSED by both report-scope patches — this is the only reorder here;\nand the same move module-wide, which updateInitiativeItemSortOrder does on any status.",
        "description": "Moves one initiative item inside a report's Initiatives part order, returning it in the Full shape.\nafterItemId is the item the moved item lands DIRECTLY after; null, 0 or an omitted property all mean\nthe FIRST position, and anchoring an item on itself is a no-op. There is no absolute index. The\nanchor must be an item of the REPORT, unlike the module operation where any company you see is a\nlegitimate anchor; either id you cannot reach here is notFound with nothing moved.\nDRAFT ONLY: a frozen report — completed or archived — rejects a move with validationFailed. The\norder is ONE client-wide sequence the report renders a subsequence of, so a move here changes what\nevery report of that company shows.\nWhen to use: report scope, on itemIds from listReportInitiativeItems, whose order this writes.\nNot here: /sortOrder stays REFUSED by both report-scope patches — this is the only reorder here;\nand the same move module-wide, which updateInitiativeItemSortOrder does on any status.",
        "operationId": "updateReportInitiativeItemSortOrder",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiativeItemSortOrderInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/initiatives/columns": {
      "get": {
        "tags": [
          "ReportInitiatives"
        ],
        "summary": "Lists the column definitions behind a report's Initiatives part, in the module's own column order.\nWhile the report is a draft these are the module's live columns; on a completed or archived report\nthey are the definitions frozen at completion time — the only thing that can interpret that\nreport's custom values and its status / priority ids, which the module's current option lists may\nno longer contain.\nWhen to use: before reading the report's items — a custom column's customColumnTypeEnum says how to\nread the values an item holds in it, and the Status and Priority columns carry the option lists\nthat resolve an item's status / priority.\nNext: returns the columnId that appears in an item's columnValues, and the option ids the statusId /\npriorityId filters of listReportInitiativeItems take.\nNot here: the module's current columns, which listInitiativeColumns returns.",
        "description": "Lists the column definitions behind a report's Initiatives part, in the module's own column order.\nWhile the report is a draft these are the module's live columns; on a completed or archived report\nthey are the definitions frozen at completion time — the only thing that can interpret that\nreport's custom values and its status / priority ids, which the module's current option lists may\nno longer contain.\nWhen to use: before reading the report's items — a custom column's customColumnTypeEnum says how to\nread the values an item holds in it, and the Status and Priority columns carry the option lists\nthat resolve an item's status / priority.\nNext: returns the columnId that appears in an item's columnValues, and the option ids the statusId /\npriorityId filters of listReportInitiativeItems take.\nNot here: the module's current columns, which listInitiativeColumns returns.",
        "operationId": "listReportInitiativeColumns",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeColumnResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/initiatives/tags": {
      "get": {
        "tags": [
          "ReportInitiatives"
        ],
        "summary": "Lists the tag vocabulary behind a report's Initiatives part, in the Tags Library order. While the\nreport is a draft these are the module's live tags; on a completed or archived report they are the\nvocabulary frozen at completion time — the only thing that can name the tags that report's items\ncarry, which the module's current library may no longer hold. A READ, so it answers on every report\nstatus unlike this scope's writes: the vocabulary belongs to the module, so creating, renaming,\ndeleting and reordering a tag stay module-scope.\nWhen to use: before filtering the report's items by tag, and to resolve a tagId an item carries.\nNext: returns the tagId taken by listReportInitiativeItems' tagId / tagIdIn filters, by\ncreateReportInitiativeItem's tagsIds and by patchReportInitiativeItem's /tagsIds path.\nNot here: the module's current vocabulary, which listInitiativeTags returns — for an old report\nthe two can differ; and these are not the tags used by reports, plans or metrics.",
        "description": "Lists the tag vocabulary behind a report's Initiatives part, in the Tags Library order. While the\nreport is a draft these are the module's live tags; on a completed or archived report they are the\nvocabulary frozen at completion time — the only thing that can name the tags that report's items\ncarry, which the module's current library may no longer hold. A READ, so it answers on every report\nstatus unlike this scope's writes: the vocabulary belongs to the module, so creating, renaming,\ndeleting and reordering a tag stay module-scope.\nWhen to use: before filtering the report's items by tag, and to resolve a tagId an item carries.\nNext: returns the tagId taken by listReportInitiativeItems' tagId / tagIdIn filters, by\ncreateReportInitiativeItem's tagsIds and by patchReportInitiativeItem's /tagsIds path.\nNot here: the module's current vocabulary, which listInitiativeTags returns — for an old report\nthe two can differ; and these are not the tags used by reports, plans or metrics.",
        "operationId": "listReportInitiativeTags",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeTagResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/plan": {
      "get": {
        "tags": [
          "ReportPlan"
        ],
        "summary": "Returns the plan attached to a report part as id + name. A part carrying no plan is notFound; one\nwhose plan can no longer be resolved (deleted, or an archived snapshot predating the feature) still\nreturns the id, with a null name.\nWhen to use: the entry to this surface — reportId and partId come first. partId is a report part\nwhose typeEnum is exactly \"plan\", from listReportParts. The roadmap, flexibleRoadmap, budget and\nflexibleBudget types never carry a plan and answer notFound here; a report whose listReportParts\nshows no \"plan\" row has no plan section at all.\nNext: listReportPlanParts for the planPartId that listReportPlanColumns and listReportPlanItems take.\nNot here: this plan id is no reachability guarantee for getPlan — the standalone plan tools resolve\naccess directly while this route resolves it through the report part, so the same plan id can be\nreachable through one and not the other.",
        "description": "Returns the plan attached to a report part as id + name. A part carrying no plan is notFound; one\nwhose plan can no longer be resolved (deleted, or an archived snapshot predating the feature) still\nreturns the id, with a null name.\nWhen to use: the entry to this surface — reportId and partId come first. partId is a report part\nwhose typeEnum is exactly \"plan\", from listReportParts. The roadmap, flexibleRoadmap, budget and\nflexibleBudget types never carry a plan and answer notFound here; a report whose listReportParts\nshows no \"plan\" row has no plan section at all.\nNext: listReportPlanParts for the planPartId that listReportPlanColumns and listReportPlanItems take.\nNot here: this plan id is no reachability guarantee for getPlan — the standalone plan tools resolve\naccess directly while this route resolves it through the report part, so the same plan id can be\nreachable through one and not the other.",
        "operationId": "getReportPlan",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportPlanResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/plan/parts": {
      "get": {
        "tags": [
          "ReportPlan"
        ],
        "summary": "Lists the parts (sections) of the plan attached to a report part, in the plan's own order.\nWhen to use: this surface is nested — its columns and items need reportId + partId + planPartId,\nunlike the report assessment, which listReportAssessmentItems reaches with reportId alone. partId is a\nreport part whose typeEnum is exactly \"plan\", from listReportParts — roadmap/flexibleRoadmap/budget\nparts never carry a plan.\nNext: listReportPlanColumns and listReportPlanItems, both taking the planPartId returned here.\nNot here: the parts of a standalone plan — listPlanParts takes a planId from listPlans and resolves\naccess directly; the two scopes are never interchangeable.",
        "description": "Lists the parts (sections) of the plan attached to a report part, in the plan's own order.\nWhen to use: this surface is nested — its columns and items need reportId + partId + planPartId,\nunlike the report assessment, which listReportAssessmentItems reaches with reportId alone. partId is a\nreport part whose typeEnum is exactly \"plan\", from listReportParts — roadmap/flexibleRoadmap/budget\nparts never carry a plan.\nNext: listReportPlanColumns and listReportPlanItems, both taking the planPartId returned here.\nNot here: the parts of a standalone plan — listPlanParts takes a planId from listPlans and resolves\naccess directly; the two scopes are never interchangeable.",
        "operationId": "listReportPlanParts",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanPartResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/plan/parts/{planPartId}/columns": {
      "get": {
        "tags": [
          "ReportPlan"
        ],
        "summary": "Lists the columns of one part of the plan attached to a report part. A planPartId belonging to\nanother plan is reported as not found, never as an empty page.\nWhen to use: to learn the column shape of the rows listReportPlanItems returns for the same\nplanPartId, which comes from listReportPlanParts — and to learn which of those columns an item\npatch may write. Every row carries isEditable, the patchPath patchReportPlanItem takes when it is\ntrue, and the options of a dropdown-backed column, exactly as listPlanColumns publishes them; for a\ncompleted or archived report all three come from the report's snapshot, and a snapshot that carries\nno settings for a column serves no options for it.\nNot here: the columns of a standalone plan part — listPlanColumns takes planId + partId and resolves\naccess directly, not through the report part; the two scopes are never interchangeable.",
        "description": "Lists the columns of one part of the plan attached to a report part. A planPartId belonging to\nanother plan is reported as not found, never as an empty page.\nWhen to use: to learn the column shape of the rows listReportPlanItems returns for the same\nplanPartId, which comes from listReportPlanParts — and to learn which of those columns an item\npatch may write. Every row carries isEditable, the patchPath patchReportPlanItem takes when it is\ntrue, and the options of a dropdown-backed column, exactly as listPlanColumns publishes them; for a\ncompleted or archived report all three come from the report's snapshot, and a snapshot that carries\nno settings for a column serves no options for it.\nNot here: the columns of a standalone plan part — listPlanColumns takes planId + partId and resolves\naccess directly, not through the report part; the two scopes are never interchangeable.",
        "operationId": "listReportPlanColumns",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "planPartId",
            "in": "path",
            "description": "Plan part id inside the report's plan part.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanColumnResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/plan/parts/{planPartId}/items": {
      "get": {
        "tags": [
          "ReportPlan"
        ],
        "summary": "Lists the items of one part of the plan attached to a report part as a FLAT page in the part's own\norder. Every row carries parentId, so the page IS the tree the internal screen renders: a null\nparentId is a root item, any other value is the id of another row of the same part. A planPartId\nbelonging to another plan is reported as not found.\nWhen to use: items here need all three ids — reportId + partId + planPartId from listReportPlanParts.\nview=Full is the default; view=Summary is the same row WITHOUT description, the one unbounded field\non a page of items — descriptionLength is in both views.\nNext: getReportPlanItem reads one of these items back and patchReportPlanItem writes it — both take\nthe itemId returned here. parentId/parentIdIn filter to one item's children.\nNot here: the same items through the standalone plans routes — listPlanItems and getPlanItem resolve\nplan access directly; the two scopes are never interchangeable.",
        "description": "Lists the items of one part of the plan attached to a report part as a FLAT page in the part's own\norder. Every row carries parentId, so the page IS the tree the internal screen renders: a null\nparentId is a root item, any other value is the id of another row of the same part. A planPartId\nbelonging to another plan is reported as not found.\nWhen to use: items here need all three ids — reportId + partId + planPartId from listReportPlanParts.\nview=Full is the default; view=Summary is the same row WITHOUT description, the one unbounded field\non a page of items — descriptionLength is in both views.\nNext: getReportPlanItem reads one of these items back and patchReportPlanItem writes it — both take\nthe itemId returned here. parentId/parentIdIn filter to one item's children.\nNot here: the same items through the standalone plans routes — listPlanItems and getPlanItem resolve\nplan access directly; the two scopes are never interchangeable.",
        "operationId": "listReportPlanItems",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "planPartId",
            "in": "path",
            "description": "Plan part id inside the report's plan part.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the item with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the item with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the items with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items with these ids."
            }
          },
          {
            "name": "ParentId",
            "in": "query",
            "description": "Items nested directly under the item with this id.",
            "schema": {
              "type": "integer",
              "description": "Items nested directly under the item with this id.",
              "format": "int32"
            }
          },
          {
            "name": "ParentIdIn",
            "in": "query",
            "description": "Items nested directly under any of the items with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items nested directly under any of the items with these ids."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Full by default, which is the opposite of every other list on this surface. That is deliberate:\nthese two lists shipped with the description in the row, and the contract is additive inside v1, so\ndefaulting to Summary would silently remove a field from every existing caller's response.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ReportPlan"
        ],
        "summary": "Creates an item in one part of the plan attached to a report part of a DRAFT report and returns it.\nThe row is the LIVE plan's row, so getPlanItem reads it back too. Every body field is optional: {}\ncreates an active item at the end of the part.\nWhen to use: to add a row to a report's plan. An item has no name field — its displayed name is its\nvalue in the part's Name-type column, so send it through columns, keyed by the columnId\nlistReportPlanColumns returns; only a column whose isEditable is true may be named. A report that is\nnot a draft is 400 validationFailed. Send an Idempotency-Key so a retry replays instead of creating\na second item.\nNext: patchReportPlanItem writes the row.\nNot here: choosing a sort order (the item is appended) and creating a group or a mid-item; and\ncreatePlanItem, which creates the same kind of row through the standalone plans routes, resolving\nplan access directly rather than through the report part.",
        "description": "Creates an item in one part of the plan attached to a report part of a DRAFT report and returns it.\nThe row is the LIVE plan's row, so getPlanItem reads it back too. Every body field is optional: {}\ncreates an active item at the end of the part.\nWhen to use: to add a row to a report's plan. An item has no name field — its displayed name is its\nvalue in the part's Name-type column, so send it through columns, keyed by the columnId\nlistReportPlanColumns returns; only a column whose isEditable is true may be named. A report that is\nnot a draft is 400 validationFailed. Send an Idempotency-Key so a retry replays instead of creating\na second item.\nNext: patchReportPlanItem writes the row.\nNot here: choosing a sort order (the item is appended) and creating a group or a mid-item; and\ncreatePlanItem, which creates the same kind of row through the standalone plans routes, resolving\nplan access directly rather than through the report part.",
        "operationId": "createReportPlanItem",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "planPartId",
            "in": "path",
            "description": "Plan part id inside the report's plan part.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "ReportPlan"
        ],
        "summary": "Writes the SAME column values into several items of a DRAFT report's plan part and returns a\nper-item outcome. The body is {itemIds, patch}: itemIds is required and non-empty (an empty list is\n400, never \"all items\"), and patch is a JSON Patch naming /columns/{columnId} ONLY.\nWhen to use: to set one field across many rows in one call. The scalar paths patchReportPlanItem\naccepts are NOT bulk-writable — 400 here, as is a non-editable column and a non-draft report; a\ncolumn of another plan part is not found. The document is validated before the first write, so a\nbad request changes no item.\nThe answer is a PARTIAL SUCCESS: 200 with items[] and errors[{id, code, message}] — 200 even when\nevery id failed. An id that is not an item of this plan part comes back as a notFound entry while\nthe others still update.\nNext: getReportPlanItem or listReportPlanItems re-reads the result.\nNot here: deleting or moving many items; patchPlanItems is the standalone-scope twin.",
        "description": "Writes the SAME column values into several items of a DRAFT report's plan part and returns a\nper-item outcome. The body is {itemIds, patch}: itemIds is required and non-empty (an empty list is\n400, never \"all items\"), and patch is a JSON Patch naming /columns/{columnId} ONLY.\nWhen to use: to set one field across many rows in one call. The scalar paths patchReportPlanItem\naccepts are NOT bulk-writable — 400 here, as is a non-editable column and a non-draft report; a\ncolumn of another plan part is not found. The document is validated before the first write, so a\nbad request changes no item.\nThe answer is a PARTIAL SUCCESS: 200 with items[] and errors[{id, code, message}] — 200 even when\nevery id failed. An id that is not an item of this plan part comes back as a notFound entry while\nthe others still update.\nNext: getReportPlanItem or listReportPlanItems re-reads the result.\nNot here: deleting or moving many items; patchPlanItems is the standalone-scope twin.",
        "operationId": "patchReportPlanItems",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "planPartId",
            "in": "path",
            "description": "Plan part id inside the report's plan part.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanItemsBulkPatchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemsBulkPatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/plan/parts/{planPartId}/items/{itemId}": {
      "get": {
        "tags": [
          "ReportPlan"
        ],
        "summary": "Returns ONE item of the plan attached to a report part. A planPartId belonging to another plan, or an\nitemId belonging to another plan part, is reported as not found. Unlike the write, this read serves a\ncompleted or archived report too — the plan scope resolves the snapshot itself.\nWhen to use: to read one item back after patchReportPlanItem, or to follow an itemId from\nlistReportPlanItems without paging the whole part again.\nNot here: getPlanItem reads the same item through the standalone plans routes, resolving plan access\ndirectly rather than through the report part; the two scopes are never interchangeable.",
        "description": "Returns ONE item of the plan attached to a report part. A planPartId belonging to another plan, or an\nitemId belonging to another plan part, is reported as not found. Unlike the write, this read serves a\ncompleted or archived report too — the plan scope resolves the snapshot itself.\nWhen to use: to read one item back after patchReportPlanItem, or to follow an itemId from\nlistReportPlanItems without paging the whole part again.\nNot here: getPlanItem reads the same item through the standalone plans routes, resolving plan access\ndirectly rather than through the report part; the two scopes are never interchangeable.",
        "operationId": "getReportPlanItem",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "planPartId",
            "in": "path",
            "description": "Plan part id inside the report's plan part.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "ReportPlan"
        ],
        "summary": "Applies a JSON Patch to one item of a DRAFT report's plan, returning the updated item. Patchable:\n/isActive, /isCollapsed, /sortOrder, /description, /parentId, plus /columns/{columnId}; any other\npath is 400, as is a non-draft report; the whole document is validated first, so one bad\noperation writes nothing. Only a column whose isEditable is true on listReportPlanColumns may be\nnamed (its patchPath); a column of another plan part is not found.\n/parentId moves the item in its part's tree: the new parent must be another item of the SAME plan\npart (a foreign id is not found), the item's own id or a descendant is 400, and it lands LAST\namong the new parent's children; with /sortOrder in the same document the move applies first, then\n/sortOrder.\nWhen to use: itemId comes from listReportPlanItems, planPartId from listReportPlanParts.\nNot here: patchPlanItem writes the same row through the standalone plans routes, which resolve plan\naccess directly.",
        "description": "Applies a JSON Patch to one item of a DRAFT report's plan, returning the updated item. Patchable:\n/isActive, /isCollapsed, /sortOrder, /description, /parentId, plus /columns/{columnId}; any other\npath is 400, as is a non-draft report; the whole document is validated first, so one bad\noperation writes nothing. Only a column whose isEditable is true on listReportPlanColumns may be\nnamed (its patchPath); a column of another plan part is not found.\n/parentId moves the item in its part's tree: the new parent must be another item of the SAME plan\npart (a foreign id is not found), the item's own id or a descendant is 400, and it lands LAST\namong the new parent's children; with /sortOrder in the same document the move applies first, then\n/sortOrder.\nWhen to use: itemId comes from listReportPlanItems, planPartId from listReportPlanParts.\nNot here: patchPlanItem writes the same row through the standalone plans routes, which resolve plan\naccess directly.",
        "operationId": "patchReportPlanItem",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "planPartId",
            "in": "path",
            "description": "Plan part id inside the report's plan part.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/plan/parts/{planPartId}/items/{itemId}/copy": {
      "post": {
        "tags": [
          "ReportPlan"
        ],
        "summary": "Duplicates one item of a DRAFT report's plan and returns the copy. No body.\nWhen to use: to add a row identical to an existing one — the copy carries the source's values, so it\nbeats re-sending them on createReportPlanItem.\nWhat is copied: the item, its column values and its image links. The items nested UNDER it are NOT\ncopied — copy them one by one and reparent the copies with patchReportPlanItem /parentId. The copy\nkeeps the source's parent and lands directly after the source among its siblings. It writes the LIVE\nplan's row, so getPlanItem reads it back too. A report that is not a draft is 400 validationFailed.\nSend an Idempotency-Key so a retry replays instead of making a second copy.\nNext: patchReportPlanItem edits the copy.\nNot here: copying a whole part or plan, copying into a different plan part, and copyPlanItem, the\nstandalone-scope twin, which resolves plan access directly.",
        "description": "Duplicates one item of a DRAFT report's plan and returns the copy. No body.\nWhen to use: to add a row identical to an existing one — the copy carries the source's values, so it\nbeats re-sending them on createReportPlanItem.\nWhat is copied: the item, its column values and its image links. The items nested UNDER it are NOT\ncopied — copy them one by one and reparent the copies with patchReportPlanItem /parentId. The copy\nkeeps the source's parent and lands directly after the source among its siblings. It writes the LIVE\nplan's row, so getPlanItem reads it back too. A report that is not a draft is 400 validationFailed.\nSend an Idempotency-Key so a retry replays instead of making a second copy.\nNext: patchReportPlanItem edits the copy.\nNot here: copying a whole part or plan, copying into a different plan part, and copyPlanItem, the\nstandalone-scope twin, which resolves plan access directly.",
        "operationId": "copyReportPlanItem",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "planPartId",
            "in": "path",
            "description": "Plan part id inside the report's plan part.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/plan/parts/{planPartId}/insert-template-items": {
      "post": {
        "tags": [
          "ReportPlan"
        ],
        "summary": "Copies the items of one part of a plan TEMPLATE into a part of a DRAFT report's plan.\ntemplateId and templatePartId are required; parentId is optional.\nThe copies keep the template's own nesting among themselves, attached under parentId or at the plan\npart's root when omitted, and appended last. Values travel per column MATCH (same type, label,\ncustom type), and a dropdown value the plan's column lacks is ADDED to its options. They are the\nLIVE plan's rows, so listPlanItems sees them.\nA template you cannot see, a part of another template, a part with no items, a parentId outside this\nplan part and a non-draft report are each refused, writing nothing.\nWhen to use: to fill a report's plan part from a template. Send an Idempotency-Key so a retry replays.\nNext: listReportPlanItems shows them in place.\nNot here: choosing the position; and insertPlanTemplateItems, the standalone-scope twin.",
        "description": "Copies the items of one part of a plan TEMPLATE into a part of a DRAFT report's plan.\ntemplateId and templatePartId are required; parentId is optional.\nThe copies keep the template's own nesting among themselves, attached under parentId or at the plan\npart's root when omitted, and appended last. Values travel per column MATCH (same type, label,\ncustom type), and a dropdown value the plan's column lacks is ADDED to its options. They are the\nLIVE plan's rows, so listPlanItems sees them.\nA template you cannot see, a part of another template, a part with no items, a parentId outside this\nplan part and a non-draft report are each refused, writing nothing.\nWhen to use: to fill a report's plan part from a template. Send an Idempotency-Key so a retry replays.\nNext: listReportPlanItems shows them in place.\nNot here: choosing the position; and insertPlanTemplateItems, the standalone-scope twin.",
        "operationId": "insertReportPlanTemplateItems",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "planPartId",
            "in": "path",
            "description": "Plan part id inside the report's plan part.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanTemplateItemsInsertInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanItemResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/plan/convert-to-template": {
      "post": {
        "tags": [
          "ReportPlan"
        ],
        "summary": "Creates a plan TEMPLATE from a report part's plan and returns it. Body: name (required, ≤50, unique\nin your client), icon, colour and the two carry flags — no planId: the source is this part's plan.\nWhen to use: on a COMPLETED or ARCHIVED report this is the only way to templatize the plan AS IT WAS\nat closing — its archived snapshot, which no plan id can address. On a DRAFT report there is no\nsnapshot: it converts the LIVE plan, as createPlanTemplate does. A closed report never archived is\nserved from the live plan too; one whose archive lacks it is 400. The template lands in YOUR client\nwith the plan's parts, columns, items and values. Your role must grant plan-template create, or this\nis 403. An Idempotency-Key replays a retry.\nNext: getPlanTemplate and the part / column / item listings read it; createPlan stamps a plan from\nit.\nNot here: createPlanTemplate, which builds from a live plan id and cannot reach a snapshot.",
        "description": "Creates a plan TEMPLATE from a report part's plan and returns it. Body: name (required, ≤50, unique\nin your client), icon, colour and the two carry flags — no planId: the source is this part's plan.\nWhen to use: on a COMPLETED or ARCHIVED report this is the only way to templatize the plan AS IT WAS\nat closing — its archived snapshot, which no plan id can address. On a DRAFT report there is no\nsnapshot: it converts the LIVE plan, as createPlanTemplate does. A closed report never archived is\nserved from the live plan too; one whose archive lacks it is 400. The template lands in YOUR client\nwith the plan's parts, columns, items and values. Your role must grant plan-template create, or this\nis 403. An Idempotency-Key replays a retry.\nNext: getPlanTemplate and the part / column / item listings read it; createPlan stamps a plan from\nit.\nNot here: createPlanTemplate, which builds from a live plan id and cannot reach a snapshot.",
        "operationId": "convertReportPlanToTemplate",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportPlanTemplateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTemplateResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Lists the reports visible to the caller — your client's reports, further narrowed by your\ncompany and template access exactly as the application narrows them. Supports typed filters,\nsorting, paging and field selection. Trashed reports are never listed.\nWhen to use: the entry point of the whole report surface — every other Reports operation needs\na reportId, and rows also carry the company and template refs (id + name).\nNext: getReport for one report's extras, listReportParts for its sections,\nlistReportAssessmentItems for its assessment content; a row's template.id is the templateId\ncreateReport takes.",
        "description": "Lists the reports visible to the caller — your client's reports, further narrowed by your\ncompany and template access exactly as the application narrows them. Supports typed filters,\nsorting, paging and field selection. Trashed reports are never listed.\nWhen to use: the entry point of the whole report surface — every other Reports operation needs\na reportId, and rows also carry the company and template refs (id + name).\nNext: getReport for one report's extras, listReportParts for its sections,\nlistReportAssessmentItems for its assessment content; a row's template.id is the templateId\ncreateReport takes.",
        "operationId": "listReports",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Reports whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Reports whose name starts with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Reports whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Reports whose name contains this text."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Reports whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Reports whose name equals this text exactly."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Reports whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Reports whose name ends with this text."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the report with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the report with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the reports with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the reports with these ids."
            }
          },
          {
            "name": "CompanyId",
            "in": "query",
            "description": "Reports of the company with this id (see listCompanies).",
            "schema": {
              "type": "integer",
              "description": "Reports of the company with this id (see listCompanies).",
              "format": "int32"
            }
          },
          {
            "name": "CompanyIdIn",
            "in": "query",
            "description": "Reports of any of the companies with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Reports of any of the companies with these ids."
            }
          },
          {
            "name": "TemplateId",
            "in": "query",
            "description": "Reports created from the assessment template with this id (the id of a report's template object).",
            "schema": {
              "type": "integer",
              "description": "Reports created from the assessment template with this id (the id of a report's template object).",
              "format": "int32"
            }
          },
          {
            "name": "TemplateIdIn",
            "in": "query",
            "description": "Reports created from any of the assessment templates with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Reports created from any of the assessment templates with these ids."
            }
          },
          {
            "name": "PreparedByUserId",
            "in": "query",
            "description": "Reports prepared by the user with this id (a string GUID; see getUser).",
            "schema": {
              "type": "string",
              "description": "Reports prepared by the user with this id (a string GUID; see getUser)."
            }
          },
          {
            "name": "PreparedByUserIdIn",
            "in": "query",
            "description": "Reports prepared by any of the users with these ids (string GUIDs).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Reports prepared by any of the users with these ids (string GUIDs)."
            }
          },
          {
            "name": "StatusEnum",
            "in": "query",
            "description": "Reports with this lifecycle status: draft, completed or archive.",
            "schema": {
              "enum": [
                "archive",
                "completed",
                "draft"
              ],
              "type": "string",
              "description": "Reports with this lifecycle status: draft, completed or archive."
            }
          },
          {
            "name": "StatusEnumIn",
            "in": "query",
            "description": "Reports with any of these lifecycle statuses.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "archive",
                  "completed",
                  "draft"
                ],
                "type": "string"
              },
              "description": "Reports with any of these lifecycle statuses."
            }
          },
          {
            "name": "ReportDateAfter",
            "in": "query",
            "description": "Reports dated on or after this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Reports dated on or after this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "ReportDateBefore",
            "in": "query",
            "description": "Reports dated on or before this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Reports dated on or before this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "LatestPerCompany",
            "in": "query",
            "description": "When true, return only the latest report of each company among the reports the other filters match: the newest by reportDate, the highest id breaking a tie. \"Latest\" is across templates, so a company with reports from several templates returns one of them; combine with templateId for the latest report of one template per company. False or unset returns every matching report.",
            "schema": {
              "type": "boolean",
              "description": "When true, return only the latest report of each company among the reports the other filters match: the newest by reportDate, the highest id breaking a tie. \"Latest\" is across templates, so a company with reports from several templates returns one of them; combine with templateId for the latest report of one template per company. False or unset returns every matching report."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for the report list. Allowed values: ReportDate, Name, Id.",
            "schema": {
              "enum": [
                "reportDate",
                "name",
                "id"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for the report list. Allowed values: ReportDate, Name, Id."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "statusEnum",
                  "reportDate",
                  "healthScore",
                  "company",
                  "template",
                  "preparedByUser",
                  "overallStatusGrade"
                ],
                "type": "string",
                "description": "Selectable fields of a report. fiscalYearStartMonthEnum is deliberately absent: it cannot be\nresolved in a database projection for a completed or archived report (it is frozen inside a\ncompressed archive blob), so it is returned by getReport only."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Creates a report for a company from an assessment template and returns it. By default it copies\nthe company's latest report of the template forward (content and filters), like the\napplication's New button; carryDataFromPreviousReport: false builds a blank report from the\ntemplate, as does a company with no earlier report of it. Creating a report CLOSES the company's\nexisting draft report for the same template, and archives everything past the four most recent\ncompleted reports — the application's own behaviour, not optional. A company or template you\ncannot see is reported as not found.\nWhen to use: companyId comes from listCompanies; templateId is the id of the template object a\nlistReports row carries, so an existing report of the same kind is where to read it.\nNext: the response IS the new report — its id is the reportId every other Reports operation\ntakes, and closeReport is what later moves it from Draft to Completed.",
        "description": "Creates a report for a company from an assessment template and returns it. By default it copies\nthe company's latest report of the template forward (content and filters), like the\napplication's New button; carryDataFromPreviousReport: false builds a blank report from the\ntemplate, as does a company with no earlier report of it. Creating a report CLOSES the company's\nexisting draft report for the same template, and archives everything past the four most recent\ncompleted reports — the application's own behaviour, not optional. A company or template you\ncannot see is reported as not found.\nWhen to use: companyId comes from listCompanies; templateId is the id of the template object a\nlistReports row carries, so an existing report of the same kind is where to read it.\nNext: the response IS the new report — its id is the reportId every other Reports operation\ntakes, and closeReport is what later moves it from Draft to Completed.",
        "operationId": "createReport",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Returns one report by id, with all public fields. A report you cannot see is reported as not\nfound. Unlike the list, this also resolves the effective fiscal year start month and — for a\ndraft — the live health score.\nNext: listReportParts for this report's sections, and the paged listReportAssessmentGroups /\nlistReportAssessmentItems / listReportAssessmentColumns / listReportAssessmentGrades for its\nassessment content.",
        "description": "Returns one report by id, with all public fields. A report you cannot see is reported as not\nfound. Unlike the list, this also resolves the effective fiscal year start month and — for a\ndraft — the live health score.\nNext: listReportParts for this report's sections, and the paged listReportAssessmentGroups /\nlistReportAssessmentItems / listReportAssessmentColumns / listReportAssessmentGrades for its\nassessment content.",
        "operationId": "getReport",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Reports"
        ],
        "summary": "Applies a JSON Patch to a DRAFT report's info and returns the updated report. Exactly three\npaths are patchable — /reportDate, /preparedByUserId and /overallStatusTemplateGradeId; an op\non any other path is rejected with 400 validationFailed, and a non-draft report is rejected\nwith 400 validationFailed. Use closeReport to change the status.\nWhen to use: /preparedByUserId takes a userId from listUsers, and /overallStatusTemplateGradeId\na grade id from listReportAssessmentGrades — not a technology grade from listTechnologyGrades.",
        "description": "Applies a JSON Patch to a DRAFT report's info and returns the updated report. Exactly three\npaths are patchable — /reportDate, /preparedByUserId and /overallStatusTemplateGradeId; an op\non any other path is rejected with 400 validationFailed, and a non-draft report is rejected\nwith 400 validationFailed. Use closeReport to change the status.\nWhen to use: /preparedByUserId takes a userId from listUsers, and /overallStatusTemplateGradeId\na grade id from listReportAssessmentGrades — not a technology grade from listTechnologyGrades.",
        "operationId": "patchReport",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/close": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Closes a draft report (Draft to Completed) and returns it. IRREVERSIBLE: there is no reopen\noperation — once closed, a report can never go back to Draft. Closing archives the report's\nparts, plan and technology data and deactivates its notifications. Closing an already closed\nreport is rejected with 400 validationFailed; two concurrent closes leave one winner and the\nother is rejected with 400 validationFailed saying the report is already being processed.\nWhen to use: the only way to change a report's status — patchReport rejects that path. The\nDraft-only writes (patchReportAssessmentItem, patchReportAssessmentColumn,\npatchReportPartExecutiveSummary, patchReportPartNote) are rejected once this has run.",
        "description": "Closes a draft report (Draft to Completed) and returns it. IRREVERSIBLE: there is no reopen\noperation — once closed, a report can never go back to Draft. Closing archives the report's\nparts, plan and technology data and deactivates its notifications. Closing an already closed\nreport is rejected with 400 validationFailed; two concurrent closes leave one winner and the\nother is rejected with 400 validationFailed saying the report is already being processed.\nWhen to use: the only way to change a report's status — patchReport rejects that path. The\nDraft-only writes (patchReportAssessmentItem, patchReportAssessmentColumn,\npatchReportPartExecutiveSummary, patchReportPartNote) are rejected once this has run.",
        "operationId": "closeReport",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/parts": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Lists the parts (sections) of a report in their display order, internal ones included.\nWhen to use: takes the reportId and nothing else, and its partId is what every part-scoped\nroute needs.\nNext: a row's typeEnum routes the follow-up — Plan to getReportPlan and listReportPlanParts,\nFlexibleItems to listReportTechnologyGroups, ExecutiveSummary/Text/Cover to\ngetReportPartSummaryAndNote, Text alone to getReportPartTextPart.\nNot here: the assessment is NOT a part — listReportAssessmentGroups, listReportAssessmentItems,\nlistReportAssessmentColumns and listReportAssessmentGrades take the reportId directly, with no\npartId in between.",
        "description": "Lists the parts (sections) of a report in their display order, internal ones included.\nWhen to use: takes the reportId and nothing else, and its partId is what every part-scoped\nroute needs.\nNext: a row's typeEnum routes the follow-up — Plan to getReportPlan and listReportPlanParts,\nFlexibleItems to listReportTechnologyGroups, ExecutiveSummary/Text/Cover to\ngetReportPartSummaryAndNote, Text alone to getReportPartTextPart.\nNot here: the assessment is NOT a part — listReportAssessmentGroups, listReportAssessmentItems,\nlistReportAssessmentColumns and listReportAssessmentGrades take the reportId directly, with no\npartId in between.",
        "operationId": "listReportParts",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportPartResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/assessment/groups": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Lists the assessment groups of a report as paged rows in the report's group order: name,\ndescription, activity, sort order, health score, template group id, markets, tags and\nitemsCount. Rows carry NO items — call listReportAssessmentItems with groupId for a group's\nitems, using itemsCount to size that read. Supports typed filters and view/fields selection:\nSummary (default) returns id + name + isActive + itemsCount, view=Full every field, and\nfields=... replaces the preset rather than adding to it (exactly the fields listed, plus id),\noverriding view when both are sent. A report you cannot see is reported as not found.\nWhen to use: takes the reportId and nothing else, with no partId in between.\nNext: a row's id is the groupId getReportAssessmentGroupHealth takes.\nNot here: these are the report's assessment categories — not territories (listCompanyGroups)\nand not flexible-item groups (listReportTechnologyGroups).",
        "description": "Lists the assessment groups of a report as paged rows in the report's group order: name,\ndescription, activity, sort order, health score, template group id, markets, tags and\nitemsCount. Rows carry NO items — call listReportAssessmentItems with groupId for a group's\nitems, using itemsCount to size that read. Supports typed filters and view/fields selection:\nSummary (default) returns id + name + isActive + itemsCount, view=Full every field, and\nfields=... replaces the preset rather than adding to it (exactly the fields listed, plus id),\noverriding view when both are sent. A report you cannot see is reported as not found.\nWhen to use: takes the reportId and nothing else, with no partId in between.\nNext: a row's id is the groupId getReportAssessmentGroupHealth takes.\nNot here: these are the report's assessment categories — not territories (listCompanyGroups)\nand not flexible-item groups (listReportTechnologyGroups).",
        "operationId": "listReportAssessmentGroups",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IsActive",
            "in": "query",
            "description": "Return only active (true) or inactive (false) groups.",
            "schema": {
              "type": "boolean",
              "description": "Return only active (true) or inactive (false) groups."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Return only the groups whose name equals this value (case-insensitive).",
            "schema": {
              "type": "string",
              "description": "Return only the groups whose name equals this value (case-insensitive)."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Return only the groups whose name contains this value (case-insensitive).",
            "schema": {
              "type": "string",
              "description": "Return only the groups whose name contains this value (case-insensitive)."
            }
          },
          {
            "name": "MarketId",
            "in": "query",
            "description": "Return only the groups carrying the market with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the groups carrying the market with this id.",
              "format": "int32"
            }
          },
          {
            "name": "MarketIdIn",
            "in": "query",
            "description": "Return only the groups carrying any of the markets with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the groups carrying any of the markets with these ids."
            }
          },
          {
            "name": "TagId",
            "in": "query",
            "description": "Return only the groups carrying the tag with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the groups carrying the tag with this id.",
              "format": "int32"
            }
          },
          {
            "name": "TagIdIn",
            "in": "query",
            "description": "Return only the groups carrying any of the tags with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the groups carrying any of the tags with these ids."
            }
          },
          {
            "name": "TemplateGroupId",
            "in": "query",
            "description": "Return only the groups created from the template group with this id; 0 returns the groups without a template group.",
            "schema": {
              "type": "integer",
              "description": "Return only the groups created from the template group with this id; 0 returns the groups without a template group.",
              "format": "int32"
            }
          },
          {
            "name": "TemplateGroupIdIn",
            "in": "query",
            "description": "Return only the groups created from the template groups with these ids; 0 includes the groups without a template group.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the groups created from the template groups with these ids; 0 includes the groups without a template group."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "description",
                  "isActive",
                  "sortOrder",
                  "healthScore",
                  "templateGroupId",
                  "isManualAdded",
                  "markets",
                  "tags",
                  "itemsCount"
                ],
                "type": "string",
                "description": "Selectable response fields of an assessment group row (used by the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportAssessmentGroupRowResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/assessment/items": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Lists ALL assessment items of a report as one flattened paged list, ordered by group then item\nsort order. Typed filters: groupId, statusEquals/statusIn (free text, matched\ncase-insensitively), templateGradeId/templateGradeIdIn (ids from listReportAssessmentGrades),\nsiteId, tagId, isActive, isManualAdded, name, templateItemId/templateItemIdIn, hasGrade\n(false = ungraded). templateItemId is returned under view=Full. A company's latest report:\nlistReports (companyId, sortBy ReportDate, sortDir desc, pageSize 1), then this with\nstatusEquals or templateGradeIdIn. A report you cannot see is reported as not found.\nWhen to use: takes the reportId alone — items are a flat list off the report, NOT nested under\na part or group the way listReportPlanItems and listReportTechnologyItems are.\nNext: a row's id is the itemId getReportAssessmentItem and patchReportAssessmentItem take;\ngroupId comes from listReportAssessmentGroups.",
        "description": "Lists ALL assessment items of a report as one flattened paged list, ordered by group then item\nsort order. Typed filters: groupId, statusEquals/statusIn (free text, matched\ncase-insensitively), templateGradeId/templateGradeIdIn (ids from listReportAssessmentGrades),\nsiteId, tagId, isActive, isManualAdded, name, templateItemId/templateItemIdIn, hasGrade\n(false = ungraded). templateItemId is returned under view=Full. A company's latest report:\nlistReports (companyId, sortBy ReportDate, sortDir desc, pageSize 1), then this with\nstatusEquals or templateGradeIdIn. A report you cannot see is reported as not found.\nWhen to use: takes the reportId alone — items are a flat list off the report, NOT nested under\na part or group the way listReportPlanItems and listReportTechnologyItems are.\nNext: a row's id is the itemId getReportAssessmentItem and patchReportAssessmentItem take;\ngroupId comes from listReportAssessmentGroups.",
        "operationId": "listReportAssessmentItems",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "GroupId",
            "in": "query",
            "description": "Return only the items of the assessment group with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the items of the assessment group with this id.",
              "format": "int32"
            }
          },
          {
            "name": "GroupIdIn",
            "in": "query",
            "description": "Return only the items of the assessment groups with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items of the assessment groups with these ids."
            }
          },
          {
            "name": "TemplateGradeId",
            "in": "query",
            "description": "Return only the items graded with the template grade with this id (see listReportAssessmentGrades).",
            "schema": {
              "type": "integer",
              "description": "Return only the items graded with the template grade with this id (see listReportAssessmentGrades).",
              "format": "int32"
            }
          },
          {
            "name": "TemplateGradeIdIn",
            "in": "query",
            "description": "Return only the items graded with any of the template grades with these ids (see listReportAssessmentGrades).",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items graded with any of the template grades with these ids (see listReportAssessmentGrades)."
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "description": "Return only the items of the site with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the items of the site with this id.",
              "format": "int32"
            }
          },
          {
            "name": "SiteIdIn",
            "in": "query",
            "description": "Return only the items of the sites with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items of the sites with these ids."
            }
          },
          {
            "name": "TagId",
            "in": "query",
            "description": "Return only the items carrying the tag with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the items carrying the tag with this id.",
              "format": "int32"
            }
          },
          {
            "name": "TagIdIn",
            "in": "query",
            "description": "Return only the items carrying any of the tags with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items carrying any of the tags with these ids."
            }
          },
          {
            "name": "StatusEquals",
            "in": "query",
            "description": "Return only the items whose status equals this value (case-insensitive).",
            "schema": {
              "type": "string",
              "description": "Return only the items whose status equals this value (case-insensitive)."
            }
          },
          {
            "name": "StatusIn",
            "in": "query",
            "description": "Return only the items whose status equals any of these values (case-insensitive).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Return only the items whose status equals any of these values (case-insensitive)."
            }
          },
          {
            "name": "IsActive",
            "in": "query",
            "description": "Return only active (true) or inactive (false) items.",
            "schema": {
              "type": "boolean",
              "description": "Return only active (true) or inactive (false) items."
            }
          },
          {
            "name": "IsManualAdded",
            "in": "query",
            "description": "Return only manually added (true) or template-created (false) items.",
            "schema": {
              "type": "boolean",
              "description": "Return only manually added (true) or template-created (false) items."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Return only the items whose name equals this value (case-insensitive).",
            "schema": {
              "type": "string",
              "description": "Return only the items whose name equals this value (case-insensitive)."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Return only the items whose name contains this value (case-insensitive).",
            "schema": {
              "type": "string",
              "description": "Return only the items whose name contains this value (case-insensitive)."
            }
          },
          {
            "name": "TemplateItemId",
            "in": "query",
            "description": "Return only the items created from the template item with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the items created from the template item with this id.",
              "format": "int32"
            }
          },
          {
            "name": "TemplateItemIdIn",
            "in": "query",
            "description": "Return only the items created from any of the template items with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items created from any of the template items with these ids."
            }
          },
          {
            "name": "HasGrade",
            "in": "query",
            "description": "Return only graded (true) or ungraded (false) items.",
            "schema": {
              "type": "boolean",
              "description": "Return only graded (true) or ungraded (false) items."
            }
          },
          {
            "name": "GradeIsDefault",
            "in": "query",
            "description": "Return only the items whose grade is the template's default grade (true) or has been changed from it (false). Ungraded items (no grade row) are excluded from both true and false.",
            "schema": {
              "type": "boolean",
              "description": "Return only the items whose grade is the template's default grade (true) or has been changed from it (false). Ungraded items (no grade row) are excluded from both true and false."
            }
          },
          {
            "name": "StatusIsEmpty",
            "in": "query",
            "description": "Return only the items whose status is empty (true) or non-empty (false). A status of only spaces counts as empty.",
            "schema": {
              "type": "boolean",
              "description": "Return only the items whose status is empty (true) or non-empty (false). A status of only spaces counts as empty."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "description",
                  "healthStandard",
                  "status",
                  "risk",
                  "solution",
                  "month",
                  "year",
                  "oneTimeBudget",
                  "recurringBudget",
                  "recurringPeriod",
                  "quantity",
                  "recurringTotal",
                  "weight",
                  "effectiveDate",
                  "cancellationDate",
                  "grade",
                  "tags",
                  "site",
                  "customValues",
                  "sortOrder",
                  "isActive",
                  "templateItemId",
                  "isManualAdded",
                  "groupId",
                  "referenceInstructions",
                  "referenceLink"
                ],
                "type": "string",
                "description": "Selectable response fields of an assessment item (used by the fields query parameter). New members\nare APPENDED: the parameter also binds an enum member's ordinal, so inserting one in the middle\nwould silently re-point every later number at a different field."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportAssessmentItemResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/assessment/columns": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Lists the assessment columns of a report, each carrying both the report column id and the\ntemplate column id, with the per-mode display settings.\nWhen to use: takes the reportId and nothing else, with no partId in between.\nNext: a row's id is the columnId patchReportAssessmentColumn takes, while its templateColumnId\nis what patchReportAssessmentItem /customValues/{templateColumnId} takes — the two ids are not\ninterchangeable.",
        "description": "Lists the assessment columns of a report, each carrying both the report column id and the\ntemplate column id, with the per-mode display settings.\nWhen to use: takes the reportId and nothing else, with no partId in between.\nNext: a row's id is the columnId patchReportAssessmentColumn takes, while its templateColumnId\nis what patchReportAssessmentItem /customValues/{templateColumnId} takes — the two ids are not\ninterchangeable.",
        "operationId": "listReportAssessmentColumns",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportAssessmentColumnResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/assessment/columns/{columnId}": {
      "patch": {
        "tags": [
          "Reports"
        ],
        "summary": "Applies a JSON Patch to an assessment column of a DRAFT report and returns the updated\ncolumn. Exactly eight paths are patchable — /label, /sortOrder and the six per-mode\nwidth/isShow fields; an op on any other path is rejected with 400 validationFailed, and a\nnon-draft report is rejected with 400 validationFailed.\nWhen to use: columnId is the report column id — the id field of a listReportAssessmentColumns\nrow, never its templateColumnId.\nNot here: this writes the column's label and display only; an item's value for that column is\nwritten by patchReportAssessmentItem /customValues/{templateColumnId}.",
        "description": "Applies a JSON Patch to an assessment column of a DRAFT report and returns the updated\ncolumn. Exactly eight paths are patchable — /label, /sortOrder and the six per-mode\nwidth/isShow fields; an op on any other path is rejected with 400 validationFailed, and a\nnon-draft report is rejected with 400 validationFailed.\nWhen to use: columnId is the report column id — the id field of a listReportAssessmentColumns\nrow, never its templateColumnId.\nNot here: this writes the column's label and display only; an item's value for that column is\nwritten by patchReportAssessmentItem /customValues/{templateColumnId}.",
        "operationId": "patchReportAssessmentColumn",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "columnId",
            "in": "path",
            "description": "Column id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportAssessmentColumnResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/assessment/items/{itemId}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Returns one assessment item with its values and custom column values (both column ids). An\nitem that is not part of the given report is reported as not found.\nWhen to use: itemId is read off listReportAssessmentItems, which returns the same items as a\nfilterable page.\nNext: patchReportAssessmentItem writes this item on a draft report.",
        "description": "Returns one assessment item with its values and custom column values (both column ids). An\nitem that is not part of the given report is reported as not found.\nWhen to use: itemId is read off listReportAssessmentItems, which returns the same items as a\nfilterable page.\nNext: patchReportAssessmentItem writes this item on a draft report.",
        "operationId": "getReportAssessmentItem",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportAssessmentItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Reports"
        ],
        "summary": "Applies a JSON Patch to an assessment item of a DRAFT report and returns the updated item.\nPatchable paths are the persisted fields only — /siteId, /templateGradeId, /effectiveDate,\n/cancellationDate, /month, /year, /recurringPeriod, /oneTimeBudget, /recurringBudget,\n/quantity, /risk, /solution, /status and /customValues/{templateColumnId}; an op on any\nother path (for example /name or /weight) is rejected with 400 validationFailed.\nWhen to use: /templateGradeId takes a grade id from listReportAssessmentGrades, and each\n/customValues/{templateColumnId} takes the templateColumnId carried by\nlistReportAssessmentColumns.\nNot here: that same column row's id field is the report column id, and it belongs to\npatchReportAssessmentColumn, which writes the column itself and never an item's value.",
        "description": "Applies a JSON Patch to an assessment item of a DRAFT report and returns the updated item.\nPatchable paths are the persisted fields only — /siteId, /templateGradeId, /effectiveDate,\n/cancellationDate, /month, /year, /recurringPeriod, /oneTimeBudget, /recurringBudget,\n/quantity, /risk, /solution, /status and /customValues/{templateColumnId}; an op on any\nother path (for example /name or /weight) is rejected with 400 validationFailed.\nWhen to use: /templateGradeId takes a grade id from listReportAssessmentGrades, and each\n/customValues/{templateColumnId} takes the templateColumnId carried by\nlistReportAssessmentColumns.\nNot here: that same column row's id field is the report column id, and it belongs to\npatchReportAssessmentColumn, which writes the column itself and never an item's value.",
        "operationId": "patchReportAssessmentItem",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportAssessmentItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/assessment/grades": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Lists the grades available to the assessment of a report — the report template's grade set,\nwith health flags, colour, icon and legend. The grade id is what /templateGradeId accepts on\nthe item patch.\nWhen to use: takes the reportId and nothing else. These are the report's assessment grades —\nnot technology grades (listTechnologyGrades), which patchTechnologyItem /gradeId takes.\nNext: the same id is what patchReport /overallStatusTemplateGradeId takes, and what the\ntemplateGradeId filter of listReportAssessmentItems matches.",
        "description": "Lists the grades available to the assessment of a report — the report template's grade set,\nwith health flags, colour, icon and legend. The grade id is what /templateGradeId accepts on\nthe item patch.\nWhen to use: takes the reportId and nothing else. These are the report's assessment grades —\nnot technology grades (listTechnologyGrades), which patchTechnologyItem /gradeId takes.\nNext: the same id is what patchReport /overallStatusTemplateGradeId takes, and what the\ntemplateGradeId filter of listReportAssessmentItems matches.",
        "operationId": "listReportAssessmentGrades",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportAssessmentGradeResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/assessment/groups/{groupId}/health": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Returns the health score of one assessment group. A group that is not part of the given\nreport is reported as not found.\nWhen to use: for one group. groupId is an assessment group id — read it off\nlistReportAssessmentGroups, whose rows already carry the health score of every group.",
        "description": "Returns the health score of one assessment group. A group that is not part of the given\nreport is reported as not found.\nWhen to use: for one group. groupId is an assessment group id — read it off\nlistReportAssessmentGroups, whose rows already carry the health score of every group.",
        "operationId": "getReportAssessmentGroupHealth",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportAssessmentGroupHealthResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/summariesAndNotes": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Lists the executive summary and note content of every part of a report that carries them\n(executive-summary, text and cover parts), paged in the parts' display order. Both HTML strings\nare independent. Each row also reports isNoteIncluded — whether that note is shown — which is\nwritten through patchReportPartTextPart, not here.\nWhen to use: takes the reportId and nothing else — the all-parts form of\ngetReportPartSummaryAndNote, which reads one part.\nNext: a row's partId is what getReportPartSummaryAndNote, patchReportPartExecutiveSummary and\npatchReportPartNote take.",
        "description": "Lists the executive summary and note content of every part of a report that carries them\n(executive-summary, text and cover parts), paged in the parts' display order. Both HTML strings\nare independent. Each row also reports isNoteIncluded — whether that note is shown — which is\nwritten through patchReportPartTextPart, not here.\nWhen to use: takes the reportId and nothing else — the all-parts form of\ngetReportPartSummaryAndNote, which reads one part.\nNext: a row's partId is what getReportPartSummaryAndNote, patchReportPartExecutiveSummary and\npatchReportPartNote take.",
        "operationId": "listReportSummariesAndNotes",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportSummaryAndNoteResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/parts/{partId}/summaryAndNote": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Returns the executive summary and note content of one report part — two independent HTML\nstrings — plus isNoteIncluded, whether that note is shown. The flag is read-only here; write it\nwith patchReportPartTextPart. A part that is not part of the given report, or is not a\ncontent-bearing part type, is reported as not found.\nWhen to use: for one part; listReportSummariesAndNotes returns the same two strings for every\ncontent-bearing part at once. partId comes from either, or from a listReportParts row whose\ntypeEnum is ExecutiveSummary, Text or Cover.\nNext: patchReportPartExecutiveSummary and patchReportPartNote write the two strings\nindependently — patchReportPartExecutiveSummary is the writer for a Cover or Text part's body too,\nnot only an Executive Summary part's.",
        "description": "Returns the executive summary and note content of one report part — two independent HTML\nstrings — plus isNoteIncluded, whether that note is shown. The flag is read-only here; write it\nwith patchReportPartTextPart. A part that is not part of the given report, or is not a\ncontent-bearing part type, is reported as not found.\nWhen to use: for one part; listReportSummariesAndNotes returns the same two strings for every\ncontent-bearing part at once. partId comes from either, or from a listReportParts row whose\ntypeEnum is ExecutiveSummary, Text or Cover.\nNext: patchReportPartExecutiveSummary and patchReportPartNote write the two strings\nindependently — patchReportPartExecutiveSummary is the writer for a Cover or Text part's body too,\nnot only an Executive Summary part's.",
        "operationId": "getReportPartSummaryAndNote",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportSummaryAndNoteResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/parts/{partId}/executiveSummary": {
      "patch": {
        "tags": [
          "Reports"
        ],
        "summary": "Applies a JSON Patch to the MAIN CONTENT of one report part of a DRAFT report and returns both\ncontent strings. The only patchable path is /content; anything else is rejected with 400\nvalidationFailed, as is content longer than 1000000 characters or a non-draft report.\nv1 is HTML-only — there is no image add/remove surface.\nDespite the operation name, this is the content field of EVERY content-bearing part type — use it\nfor a Cover Page part and a TEXT part as well as an Executive Summary part (listReportParts\ntypeEnum Cover, Text or ExecutiveSummary). The three share one stored string; the name is\nhistorical, and there is no separate route for a Text part's body.\nNot here: the note is a separate string on the same part (patchReportPartNote), and whether\nthat note is shown is a separate flag (patchReportPartTextPart /includeNote) — patchReportPartTextPart\nwrites ONLY that flag, never a Text part's content; read all three with getReportPartSummaryAndNote.",
        "description": "Applies a JSON Patch to the MAIN CONTENT of one report part of a DRAFT report and returns both\ncontent strings. The only patchable path is /content; anything else is rejected with 400\nvalidationFailed, as is content longer than 1000000 characters or a non-draft report.\nv1 is HTML-only — there is no image add/remove surface.\nDespite the operation name, this is the content field of EVERY content-bearing part type — use it\nfor a Cover Page part and a TEXT part as well as an Executive Summary part (listReportParts\ntypeEnum Cover, Text or ExecutiveSummary). The three share one stored string; the name is\nhistorical, and there is no separate route for a Text part's body.\nNot here: the note is a separate string on the same part (patchReportPartNote), and whether\nthat note is shown is a separate flag (patchReportPartTextPart /includeNote) — patchReportPartTextPart\nwrites ONLY that flag, never a Text part's content; read all three with getReportPartSummaryAndNote.",
        "operationId": "patchReportPartExecutiveSummary",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportSummaryAndNoteResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/parts/{partId}/note": {
      "patch": {
        "tags": [
          "Reports"
        ],
        "summary": "Applies a JSON Patch to the note HTML of one report part of a DRAFT report and returns both\ncontent strings. The only patchable path is /content; anything else is rejected with 400\nvalidationFailed, as is content longer than 8000 characters or a non-draft report. Whether the\nnote is SHOWN is a separate flag on the text part (patchReportPartTextPart /includeNote).\nNot here: the executive summary is a third, independent string on the same part, written by\npatchReportPartExecutiveSummary; read both strings with getReportPartSummaryAndNote.",
        "description": "Applies a JSON Patch to the note HTML of one report part of a DRAFT report and returns both\ncontent strings. The only patchable path is /content; anything else is rejected with 400\nvalidationFailed, as is content longer than 8000 characters or a non-draft report. Whether the\nnote is SHOWN is a separate flag on the text part (patchReportPartTextPart /includeNote).\nNot here: the executive summary is a third, independent string on the same part, written by\npatchReportPartExecutiveSummary; read both strings with getReportPartSummaryAndNote.",
        "operationId": "patchReportPartNote",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportSummaryAndNoteResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Reports/{reportId}/parts/{partId}/textPart": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Returns a TEXT report part — its metadata and the include-note flag, NOT the summary or note\ncontent (that is getReportPartSummaryAndNote). A part that is not a text part of the given\nreport is reported as not found.\nWhen to use: partId must be a part whose listReportParts typeEnum is Text; the other\ncontent-bearing types answer only through getReportPartSummaryAndNote.\nDespite the name, a Text part's BODY is not here and is not written by patchReportPartTextPart —\nit is the content field served by getReportPartSummaryAndNote and written by\npatchReportPartExecutiveSummary, which is shared by Cover, Text and Executive Summary parts.\nNext: patchReportPartTextPart writes the include-note flag this returns.",
        "description": "Returns a TEXT report part — its metadata and the include-note flag, NOT the summary or note\ncontent (that is getReportPartSummaryAndNote). A part that is not a text part of the given\nreport is reported as not found.\nWhen to use: partId must be a part whose listReportParts typeEnum is Text; the other\ncontent-bearing types answer only through getReportPartSummaryAndNote.\nDespite the name, a Text part's BODY is not here and is not written by patchReportPartTextPart —\nit is the content field served by getReportPartSummaryAndNote and written by\npatchReportPartExecutiveSummary, which is shared by Cover, Text and Executive Summary parts.\nNext: patchReportPartTextPart writes the include-note flag this returns.",
        "operationId": "getReportPartTextPart",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportTextPartResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Reports"
        ],
        "summary": "Applies a JSON Patch to a TEXT report part and returns it. The only patchable path is\n/includeNote — the part's name, colour, icon, sort order and visibility flags are written\ninternally by a whole-part replace with name-uniqueness rules and stay read-only here. An op on\nany other path is rejected with 400 validationFailed. This never changes the note's content.\nWhen to use: partId must be a part whose listReportParts typeEnum is Text.\nNot here: the note's text is written by patchReportPartNote and the executive summary by\npatchReportPartExecutiveSummary — three independent resources on one part.",
        "description": "Applies a JSON Patch to a TEXT report part and returns it. The only patchable path is\n/includeNote — the part's name, colour, icon, sort order and visibility flags are written\ninternally by a whole-part replace with name-uniqueness rules and stay read-only here. An op on\nany other path is rejected with 400 validationFailed. This never changes the note's content.\nWhen to use: partId must be a part whose listReportParts typeEnum is Text.\nNot here: the note's text is written by patchReportPartNote and the executive summary by\npatchReportPartExecutiveSummary — three independent resources on one part.",
        "operationId": "patchReportPartTextPart",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportTextPartResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/technology/groups": {
      "get": {
        "tags": [
          "ReportTechnology"
        ],
        "summary": "Lists the technology groups reachable from a report part, with typed filters, sorting, paging and\nfield selection. A report or part you cannot see is reported as not found.\nWhen to use: work belonging to one report starts here. The groups themselves are the client's whole\nset, the same ones listTechnologyGroups returns — what this scope changes is everything below them:\nitems are narrowed to the report's company and writes are Draft-only. partId is a report part whose\ntypeEnum is FlexibleItems, from listReportParts.\nNext: returns the groupId taken by getReportTechnologyGroup, listReportTechnologyColumns,\nlistReportTechnologyItems and patchReportTechnologyItems.\nNot here: listTechnologyGroups reaches the same groups with no report and no part, for work that is\nnot tied to one report.",
        "description": "Lists the technology groups reachable from a report part, with typed filters, sorting, paging and\nfield selection. A report or part you cannot see is reported as not found.\nWhen to use: work belonging to one report starts here. The groups themselves are the client's whole\nset, the same ones listTechnologyGroups returns — what this scope changes is everything below them:\nitems are narrowed to the report's company and writes are Draft-only. partId is a report part whose\ntypeEnum is FlexibleItems, from listReportParts.\nNext: returns the groupId taken by getReportTechnologyGroup, listReportTechnologyColumns,\nlistReportTechnologyItems and patchReportTechnologyItems.\nNot here: listTechnologyGroups reaches the same groups with no report and no part, for work that is\nnot tied to one report.",
        "operationId": "listReportTechnologyGroups",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the group with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the group with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the groups with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the groups with these ids."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Groups whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Groups whose name equals this text exactly."
            }
          },
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Groups whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Groups whose name starts with this text."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Groups whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Groups whose name ends with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Groups whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Groups whose name contains this text."
            }
          },
          {
            "name": "TypeEnum",
            "in": "query",
            "description": "Groups of this kind (flexibleAsset, dataConfiguration, psa, domain, ssl, …).",
            "schema": {
              "enum": [
                "flexibleAsset",
                "dataConfiguration",
                "manual",
                "domain",
                "ssl",
                "psa"
              ],
              "type": "string",
              "description": "Groups of this kind (flexibleAsset, dataConfiguration, psa, domain, ssl, …)."
            }
          },
          {
            "name": "SectionId",
            "in": "query",
            "description": "Groups belonging to the section with this id (read a section id off any group's section object).",
            "schema": {
              "type": "integer",
              "description": "Groups belonging to the section with this id (read a section id off any group's section object).",
              "format": "int32"
            }
          },
          {
            "name": "SectionIdIn",
            "in": "query",
            "description": "Groups belonging to any of the sections with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Groups belonging to any of the sections with these ids."
            }
          },
          {
            "name": "IntegrationId",
            "in": "query",
            "description": "Groups synced from the integration with this id (read an integration id off any group's integration object).",
            "schema": {
              "type": "integer",
              "description": "Groups synced from the integration with this id (read an integration id off any group's integration object).",
              "format": "int32"
            }
          },
          {
            "name": "IntegrationIdIn",
            "in": "query",
            "description": "Groups synced from any of the integrations with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Groups synced from any of the integrations with these ids."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for technology groups. Allowed values: SortOrder, Name.",
            "schema": {
              "enum": [
                "sortOrder",
                "name"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for technology groups. Allowed values: SortOrder, Name."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "typeEnum",
                  "sortOrder",
                  "icon",
                  "columnCount",
                  "section",
                  "integration",
                  "viewSettings"
                ],
                "type": "string",
                "description": "Selectable response fields of a technology group (the fields query parameter). ViewSettings are\nclient configuration — which views the group appears in — and are read-only here; the current\nuser's own saved column filters and table settings are not exposed at all."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyGroupResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/technology/groups/{groupId}": {
      "get": {
        "tags": [
          "ReportTechnology"
        ],
        "summary": "Returns one technology group reachable from a report part, always in the Full shape. A group id the\nreport part cannot reach is reported as not found.\nWhen to use: you already hold the groupId and want the Full shape for one group;\nlistReportTechnologyGroups is the filterable page that produces that id.\nNext: listReportTechnologyColumns and listReportTechnologyItems for the same groupId.\nNot here: getTechnologyGroup reads the same group with no report and no part, when the work is not\ntied to one report.",
        "description": "Returns one technology group reachable from a report part, always in the Full shape. A group id the\nreport part cannot reach is reported as not found.\nWhen to use: you already hold the groupId and want the Full shape for one group;\nlistReportTechnologyGroups is the filterable page that produces that id.\nNext: listReportTechnologyColumns and listReportTechnologyItems for the same groupId.\nNot here: getTechnologyGroup reads the same group with no report and no part, when the work is not\ntied to one report.",
        "operationId": "getReportTechnologyGroup",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyGroupResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/technology/groups/{groupId}/columns": {
      "get": {
        "tags": [
          "ReportTechnology"
        ],
        "summary": "Lists the columns of a technology group in a report part. Company-type columns are never returned;\ninternal columns are, unlike the module-scope list, which never returns internal columns. Each column\ncarries isEditable and patchPath, which say whether — and through which JSON Patch path —\npatchReportTechnologyItem may write its data for an item.\nWhen to use: read the columns in the scope you intend to write in — these are the same columns the\nmodule scope lists, but the visible set differs, so isEditable and patchPath must be taken from\nhere before writing through this scope.\nNext: the column id is what patchReportTechnologyColumn edits, what listReportTechnologyItems takes\nas sortBy, and what patchReportTechnologyItem writes through as /columns/{columnId}.\nNot here: listTechnologyColumns is the module-scope column list.",
        "description": "Lists the columns of a technology group in a report part. Company-type columns are never returned;\ninternal columns are, unlike the module-scope list, which never returns internal columns. Each column\ncarries isEditable and patchPath, which say whether — and through which JSON Patch path —\npatchReportTechnologyItem may write its data for an item.\nWhen to use: read the columns in the scope you intend to write in — these are the same columns the\nmodule scope lists, but the visible set differs, so isEditable and patchPath must be taken from\nhere before writing through this scope.\nNext: the column id is what patchReportTechnologyColumn edits, what listReportTechnologyItems takes\nas sortBy, and what patchReportTechnologyItem writes through as /columns/{columnId}.\nNot here: listTechnologyColumns is the module-scope column list.",
        "operationId": "listReportTechnologyColumns",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the column with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the column with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the columns with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the columns with these ids."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Columns whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Columns whose name equals this text exactly."
            }
          },
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Columns whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Columns whose name starts with this text."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Columns whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Columns whose name ends with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Columns whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Columns whose name contains this text."
            }
          },
          {
            "name": "IsEditable",
            "in": "query",
            "description": "Return only the columns an item patch may write (true), or only the read-only ones (false).",
            "schema": {
              "type": "boolean",
              "description": "Return only the columns an item patch may write (true), or only the read-only ones (false)."
            }
          },
          {
            "name": "IsActive",
            "in": "query",
            "description": "Filter by active flag.",
            "schema": {
              "type": "boolean",
              "description": "Filter by active flag."
            }
          },
          {
            "name": "IsRecurring",
            "in": "query",
            "description": "Filter by recurring flag.",
            "schema": {
              "type": "boolean",
              "description": "Filter by recurring flag."
            }
          },
          {
            "name": "TypeEnum",
            "in": "query",
            "description": "Columns of this kind (grade, month, customAppField, customIntegrationField, …).",
            "schema": {
              "enum": [
                "customAppField",
                "customIntegrationField",
                "grade",
                "month",
                "year",
                "oneTimeBudget",
                "recurringBudget",
                "recurringPeriod",
                "quantity",
                "recurringTotal",
                "effectiveDate",
                "cancellationDate",
                "company",
                "site",
                "status",
                "serialNumber",
                "name",
                "manufacturer",
                "purchaseDate",
                "expirationDate",
                "note",
                "productId",
                "soNotes",
                "lastLoginName",
                "configurationType",
                "model",
                "technologyTypeBudgetClass",
                "endOfLife",
                "initiativeItem"
              ],
              "type": "string",
              "description": "Columns of this kind (grade, month, customAppField, customIntegrationField, …)."
            }
          },
          {
            "name": "CustomColumnTypeEnum",
            "in": "query",
            "description": "Columns of this custom type (text, checkbox, date, link, singleSelectDropDown, class, …).",
            "schema": {
              "enum": [
                "singleSelectDropDown",
                "text",
                "date",
                "user",
                "checkbox",
                "link",
                "image",
                "number",
                "html",
                "age",
                "smartMemory",
                "smartOS",
                "class"
              ],
              "type": "string",
              "description": "Columns of this custom type (text, checkbox, date, link, singleSelectDropDown, class, …)."
            }
          },
          {
            "name": "SourceColumnId",
            "in": "query",
            "description": "Columns deriving their values from the column with this id.",
            "schema": {
              "type": "integer",
              "description": "Columns deriving their values from the column with this id.",
              "format": "int32"
            }
          },
          {
            "name": "SourceColumnIdIn",
            "in": "query",
            "description": "Columns deriving their values from any of the columns with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Columns deriving their values from any of the columns with these ids."
            }
          },
          {
            "name": "IntegrationId",
            "in": "query",
            "description": "Columns synced from the integration with this id.",
            "schema": {
              "type": "integer",
              "description": "Columns synced from the integration with this id.",
              "format": "int32"
            }
          },
          {
            "name": "IntegrationIdIn",
            "in": "query",
            "description": "Columns synced from any of the integrations with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Columns synced from any of the integrations with these ids."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for technology group columns. Allowed values: SortOrder, Name.",
            "schema": {
              "enum": [
                "sortOrder",
                "name"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for technology group columns. Allowed values: SortOrder, Name."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "typeEnum",
                  "isEditable",
                  "patchPath",
                  "description",
                  "sortOrder",
                  "isActive",
                  "isRecurring",
                  "customColumnTypeEnum",
                  "typeSettings",
                  "sourceColumnId",
                  "integration",
                  "viewSettings"
                ],
                "type": "string",
                "description": "Selectable response fields of a technology group column (the fields query parameter). IsInternal is\ndeliberately absent: an internal column is never returned across the external boundary, so the flag\nwould be a constant false."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyColumnResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/technology/groups/{groupId}/columns/{columnId}": {
      "patch": {
        "tags": [
          "ReportTechnology"
        ],
        "summary": "Applies a JSON Patch to one column of a technology group in a report part and returns the updated\ncolumn. Only /name, /description and /isActive are writable; an operation on any other path is\nrejected with 400 validationFailed and nothing is written. This edits the column DEFINITION, which a\ndraft report shares with its template part — the change is therefore visible outside this report\ntoo, exactly as it is in the application.\nWhen to use: only to change a column's own definition; columnId comes from\nlistReportTechnologyColumns.\nNot here: writing a value INTO that column for an item is patchReportTechnologyItem with\n/columns/{columnId}, and the module-scope definition edit is patchTechnologyColumn.",
        "description": "Applies a JSON Patch to one column of a technology group in a report part and returns the updated\ncolumn. Only /name, /description and /isActive are writable; an operation on any other path is\nrejected with 400 validationFailed and nothing is written. This edits the column DEFINITION, which a\ndraft report shares with its template part — the change is therefore visible outside this report\ntoo, exactly as it is in the application.\nWhen to use: only to change a column's own definition; columnId comes from\nlistReportTechnologyColumns.\nNot here: writing a value INTO that column for an item is patchReportTechnologyItem with\n/columns/{columnId}, and the module-scope definition edit is patchTechnologyColumn.",
        "operationId": "patchReportTechnologyColumn",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "columnId",
            "in": "path",
            "description": "Column id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyColumnResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/technology/groups/{groupId}/items": {
      "get": {
        "tags": [
          "ReportTechnology"
        ],
        "summary": "Lists the items of a technology group in a report part. Items are narrowed to the REPORT's company —\nthat is the difference from the module-scope list, which spans every company you can see. sortBy\ntakes a COLUMN ID from listReportTechnologyColumns, not a field name. Inactive-status and unmapped\nitems are hidden by default, matching the application — pass includeInactive / includeUnmapped to\nsee them.\nWhen to use: the items of one report — this is the only technology item list narrowed to the\nreport's company. groupId comes from listReportTechnologyGroups, and partId is the report's\nFlexibleItems part from listReportParts.\nNext: returns the itemId taken by patchReportTechnologyItem and by the entityIds of\npatchReportTechnologyItems.\nNot here: listTechnologyItems is the module-scope twin and is not interchangeable with this list.",
        "description": "Lists the items of a technology group in a report part. Items are narrowed to the REPORT's company —\nthat is the difference from the module-scope list, which spans every company you can see. sortBy\ntakes a COLUMN ID from listReportTechnologyColumns, not a field name. Inactive-status and unmapped\nitems are hidden by default, matching the application — pass includeInactive / includeUnmapped to\nsee them.\nWhen to use: the items of one report — this is the only technology item list narrowed to the\nreport's company. groupId comes from listReportTechnologyGroups, and partId is the report's\nFlexibleItems part from listReportParts.\nNext: returns the itemId taken by patchReportTechnologyItem and by the entityIds of\npatchReportTechnologyItems.\nNot here: listTechnologyItems is the module-scope twin and is not interchangeable with this list.",
        "operationId": "listReportTechnologyItems",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the item with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the item with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the items with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items with these ids."
            }
          },
          {
            "name": "CompanyId",
            "in": "query",
            "description": "Items belonging to the company with this id (see listCompanies).",
            "schema": {
              "type": "integer",
              "description": "Items belonging to the company with this id (see listCompanies).",
              "format": "int32"
            }
          },
          {
            "name": "CompanyIdIn",
            "in": "query",
            "description": "Items belonging to any of the companies with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items belonging to any of the companies with these ids."
            }
          },
          {
            "name": "GradeId",
            "in": "query",
            "description": "Items carrying the grade with this id (see listTechnologyGrades).",
            "schema": {
              "type": "integer",
              "description": "Items carrying the grade with this id (see listTechnologyGrades).",
              "format": "int32"
            }
          },
          {
            "name": "GradeIdIn",
            "in": "query",
            "description": "Items carrying any of the grades with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items carrying any of the grades with these ids."
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "description": "Items belonging to the site with this id.",
            "schema": {
              "type": "integer",
              "description": "Items belonging to the site with this id.",
              "format": "int32"
            }
          },
          {
            "name": "SiteIdIn",
            "in": "query",
            "description": "Items belonging to any of the sites with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items belonging to any of the sites with these ids."
            }
          },
          {
            "name": "StatusId",
            "in": "query",
            "description": "Items carrying the status with this id.",
            "schema": {
              "type": "integer",
              "description": "Items carrying the status with this id.",
              "format": "int32"
            }
          },
          {
            "name": "StatusIdIn",
            "in": "query",
            "description": "Items carrying any of the statuses with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items carrying any of the statuses with these ids."
            }
          },
          {
            "name": "Month",
            "in": "query",
            "description": "Items whose period month equals this value (1-12).",
            "schema": {
              "maximum": 12,
              "minimum": 1,
              "type": "integer",
              "description": "Items whose period month equals this value (1-12).",
              "format": "int32"
            }
          },
          {
            "name": "Year",
            "in": "query",
            "description": "Items whose period year equals this value.",
            "schema": {
              "type": "integer",
              "description": "Items whose period year equals this value.",
              "format": "int32"
            }
          },
          {
            "name": "EffectiveDateAfter",
            "in": "query",
            "description": "Items whose effective date is on or after this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Items whose effective date is on or after this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "EffectiveDateBefore",
            "in": "query",
            "description": "Items whose effective date is on or before this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Items whose effective date is on or before this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "CancellationDateAfter",
            "in": "query",
            "description": "Items whose cancellation date is on or after this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Items whose cancellation date is on or after this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "CancellationDateBefore",
            "in": "query",
            "description": "Items whose cancellation date is on or before this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Items whose cancellation date is on or before this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Id of the COLUMN to sort by — take it from listTechnologyColumns, not a field name. An id that is not one of the group's columns is rejected. Omit it to sort by item id.",
            "schema": {
              "type": "integer",
              "description": "Id of the COLUMN to sort by — take it from listTechnologyColumns, not a field name. An id that is not one of the group's columns is rejected. Omit it to sort by item id.",
              "format": "int32"
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "company",
                  "grade",
                  "manualGradeId",
                  "autoGradeId",
                  "endOfLife",
                  "endOfLifeGrade",
                  "manualEndOfLife",
                  "autoEndOfLife",
                  "autoEndOfLifeByLifespan",
                  "autoEndOfLifeLifespanYears",
                  "autoEndOfLifeByOperatingSystem",
                  "autoEndOfLifeOperatingSystemName",
                  "month",
                  "manualMonth",
                  "autoMonth",
                  "year",
                  "manualYear",
                  "autoYear",
                  "oneTimeBudget",
                  "recurringBudget",
                  "recurringPeriod",
                  "recurringTotal",
                  "effectiveDate",
                  "cancellationDate",
                  "quantity",
                  "site",
                  "status",
                  "columns"
                ],
                "type": "string",
                "description": "Selectable response fields of a technology item (the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "IncludeInactive",
            "in": "query",
            "description": "Include items whose status is inactive. Defaults to false, matching what the application shows — so some of the group's items are hidden unless you set this.",
            "schema": {
              "type": "boolean",
              "description": "Include items whose status is inactive. Defaults to false, matching what the application shows — so some of the group's items are hidden unless you set this."
            }
          },
          {
            "name": "IncludeUnmapped",
            "in": "query",
            "description": "Include items not mapped to their integration. Defaults to false, matching what the application shows — so some of the group's items are hidden unless you set this.",
            "schema": {
              "type": "boolean",
              "description": "Include items not mapped to their integration. Defaults to false, matching what the application shows — so some of the group's items are hidden unless you set this."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyItemResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "ReportTechnology"
        ],
        "summary": "Applies ONE JSON Patch to several items of a technology group in a report part, targeted by an\nexplicit entityIds list, and returns a per-item envelope: the items that updated, plus per-id errors\nfor the rest. An id the report part cannot see — including one belonging to another company of your\nclient — comes back as a per-id notFound and is never written. An empty entityIds list is rejected;\nit is never read as \"every item in the group\", and there is no filter-based targeting. A patch naming\na non-editable column is rejected before ANY item is touched. Since a 200 is a completed outcome it\nis replayed by the idempotency layer, so retrying the failures needs a fresh Idempotency-Key.\nWhen to use: the same patch across several items you have already listed; one item, or a different\npatch per item, is patchReportTechnologyItem. entityIds come from listReportTechnologyItems.\nNot here: patchTechnologyItems is the module-scope bulk patch; the two scopes are not interchangeable.",
        "description": "Applies ONE JSON Patch to several items of a technology group in a report part, targeted by an\nexplicit entityIds list, and returns a per-item envelope: the items that updated, plus per-id errors\nfor the rest. An id the report part cannot see — including one belonging to another company of your\nclient — comes back as a per-id notFound and is never written. An empty entityIds list is rejected;\nit is never read as \"every item in the group\", and there is no filter-based targeting. A patch naming\na non-editable column is rejected before ANY item is touched. Since a 200 is a completed outcome it\nis replayed by the idempotency layer, so retrying the failures needs a fresh Idempotency-Key.\nWhen to use: the same patch across several items you have already listed; one item, or a different\npatch per item, is patchReportTechnologyItem. entityIds come from listReportTechnologyItems.\nNot here: patchTechnologyItems is the module-scope bulk patch; the two scopes are not interchangeable.",
        "operationId": "patchReportTechnologyItems",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TechnologyItemsBulkPatchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyItemsBulkPatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{reportId}/parts/{partId}/technology/groups/{groupId}/items/{itemId}": {
      "patch": {
        "tags": [
          "ReportTechnology"
        ],
        "summary": "Applies a JSON Patch to one item of a technology group in a report part and returns the updated item.\nPatchable paths are the item's own persisted fields plus /columns/{columnId} for a writable custom\ncolumn — take the path from listReportTechnologyColumns' patchPath. An operation on any other path,\nor on a column that is not editable, is rejected with 400 validationFailed before anything is\nwritten. An item outside the report's company is reported as not found.\nWhen to use: one item, or a different patch per item; the same patch across several items is\npatchReportTechnologyItems. itemId comes from listReportTechnologyItems, and /columns/{columnId} is\nonly usable where that column's isEditable is true.\nNot here: this writes the item's VALUE in a column — renaming or deactivating the column itself is\npatchReportTechnologyColumn. patchTechnologyItem is the module-scope twin.",
        "description": "Applies a JSON Patch to one item of a technology group in a report part and returns the updated item.\nPatchable paths are the item's own persisted fields plus /columns/{columnId} for a writable custom\ncolumn — take the path from listReportTechnologyColumns' patchPath. An operation on any other path,\nor on a column that is not editable, is rejected with 400 validationFailed before anything is\nwritten. An item outside the report's company is reported as not found.\nWhen to use: one item, or a different patch per item; the same patch across several items is\npatchReportTechnologyItems. itemId comes from listReportTechnologyItems, and /columns/{columnId} is\nonly usable where that column's isEditable is true.\nNot here: this writes the item's VALUE in a column — renaming or deactivating the column itself is\npatchReportTechnologyColumn. patchTechnologyItem is the module-scope twin.",
        "operationId": "patchReportTechnologyItem",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "partId",
            "in": "path",
            "description": "Part id within the parent report, plan or group template.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/technology/grades": {
      "get": {
        "tags": [
          "TechnologyGrades"
        ],
        "summary": "Lists the caller's client technology grades, with typed filters, sorting, paging and field\nselection.\nWhen to use: grades are module-level, so no technology group id is needed — one set covers\nevery group.\nNext: the gradeId returned here is taken by getTechnologyGrade, updateTechnologyGrade,\npatchTechnologyGrade, patchTechnologyItem /gradeId and the listTechnologyItems gradeId filter.\nNot here: a report assessment has its own separate set of grades — listReportAssessmentGrades.",
        "description": "Lists the caller's client technology grades, with typed filters, sorting, paging and field\nselection.\nWhen to use: grades are module-level, so no technology group id is needed — one set covers\nevery group.\nNext: the gradeId returned here is taken by getTechnologyGrade, updateTechnologyGrade,\npatchTechnologyGrade, patchTechnologyItem /gradeId and the listTechnologyItems gradeId filter.\nNot here: a report assessment has its own separate set of grades — listReportAssessmentGrades.",
        "operationId": "listTechnologyGrades",
        "parameters": [
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the grade with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the grade with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the grades with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the grades with these ids."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Grades whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Grades whose name equals this text exactly."
            }
          },
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Grades whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Grades whose name starts with this text."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Grades whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Grades whose name ends with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Grades whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Grades whose name contains this text."
            }
          },
          {
            "name": "IsDefault",
            "in": "query",
            "description": "Filter by default flag (true returns the client's single default grade).",
            "schema": {
              "type": "boolean",
              "description": "Filter by default flag (true returns the client's single default grade)."
            }
          },
          {
            "name": "IsHealth",
            "in": "query",
            "description": "Filter by health flag.",
            "schema": {
              "type": "boolean",
              "description": "Filter by health flag."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for technology grades. Allowed values: Name, SortOrder.",
            "schema": {
              "enum": [
                "name",
                "sortOrder"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for technology grades. Allowed values: Name, SortOrder."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "systemType",
                  "color",
                  "isDefault",
                  "isHealth",
                  "includeInHealth",
                  "isDisplayMode",
                  "isPresentationMode",
                  "icon",
                  "legend",
                  "sortOrder"
                ],
                "type": "string",
                "description": "Selectable response fields of a technology grade (used by the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyGradeResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "TechnologyGrades"
        ],
        "summary": "Creates a technology grade for the caller's client and returns it. Name is required and must be\nunique within the client (a duplicate returns validationFailed). The create body carries no\nsortOrder — a new grade is placed last and the position becomes writable through PUT/PATCH.\nNext: patchTechnologyGrade /sortOrder, or updateTechnologyGrade, to position the new grade.",
        "description": "Creates a technology grade for the caller's client and returns it. Name is required and must be\nunique within the client (a duplicate returns validationFailed). The create body carries no\nsortOrder — a new grade is placed last and the position becomes writable through PUT/PATCH.\nNext: patchTechnologyGrade /sortOrder, or updateTechnologyGrade, to position the new grade.",
        "operationId": "createTechnologyGrade",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TechnologyGradeInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyGradeResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/technology/grades/{id}": {
      "get": {
        "tags": [
          "TechnologyGrades"
        ],
        "summary": "Returns one technology grade of the caller's client by id.\nNext: the same id is taken by updateTechnologyGrade, patchTechnologyGrade and\npatchTechnologyItem /gradeId.",
        "description": "Returns one technology grade of the caller's client by id.\nNext: the same id is taken by updateTechnologyGrade, patchTechnologyGrade and\npatchTechnologyItem /gradeId.",
        "operationId": "getTechnologyGrade",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Technology grade id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyGradeResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "TechnologyGrades"
        ],
        "summary": "Fully replaces a technology grade (PUT) and returns it. The body is the create body plus\nsortOrder. Writes through the same core path as patchTechnologyGrade.\nWhen to use: replacing every field at once, sortOrder included; to change one field on its own\nuse patchTechnologyGrade (RFC 6902).",
        "description": "Fully replaces a technology grade (PUT) and returns it. The body is the create body plus\nsortOrder. Writes through the same core path as patchTechnologyGrade.\nWhen to use: replacing every field at once, sortOrder included; to change one field on its own\nuse patchTechnologyGrade (RFC 6902).",
        "operationId": "updateTechnologyGrade",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Technology grade id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TechnologyGradeUpdateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyGradeResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "TechnologyGrades"
        ],
        "summary": "Applies a JSON Patch to a technology grade (camelCase paths, e.g. /name, /isDefault) and returns\nthe updated resource. Writes through the same core path as updateTechnologyGrade (PUT).\nWhen to use: changing individual fields; updateTechnologyGrade replaces the whole grade and\nneeds the full body.",
        "description": "Applies a JSON Patch to a technology grade (camelCase paths, e.g. /name, /isDefault) and returns\nthe updated resource. Writes through the same core path as updateTechnologyGrade (PUT).\nWhen to use: changing individual fields; updateTechnologyGrade replaces the whole grade and\nneeds the full body.",
        "operationId": "patchTechnologyGrade",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Technology grade id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyGradeResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/technology/groups": {
      "get": {
        "tags": [
          "TechnologyGroups"
        ],
        "summary": "Lists the technology (flexible items) groups of the caller's client, with typed filters, sorting,\npaging and field selection. Groups are client-scoped; the per-user company visibility rules apply\nto items, not to groups, so every group of your client is listed here.\nWhen to use: this is the module scope, reached with no report and no part. For a draft report's part\nlistReportTechnologyGroups returns the same client-wide set of groups; pick that one when the columns\nand items you go on to read must be the report's, since only that scope narrows items to the\nreport's company and only that scope can write.\nNext: returns the groupId taken by listTechnologyColumns and listTechnologyItems. The sectionId and\nintegrationId filters have no listing operation: read those values off a group's section /\nintegration object.\nNot here: \"group\" also names a territory, which is listCompanyGroups — a different entity.",
        "description": "Lists the technology (flexible items) groups of the caller's client, with typed filters, sorting,\npaging and field selection. Groups are client-scoped; the per-user company visibility rules apply\nto items, not to groups, so every group of your client is listed here.\nWhen to use: this is the module scope, reached with no report and no part. For a draft report's part\nlistReportTechnologyGroups returns the same client-wide set of groups; pick that one when the columns\nand items you go on to read must be the report's, since only that scope narrows items to the\nreport's company and only that scope can write.\nNext: returns the groupId taken by listTechnologyColumns and listTechnologyItems. The sectionId and\nintegrationId filters have no listing operation: read those values off a group's section /\nintegration object.\nNot here: \"group\" also names a territory, which is listCompanyGroups — a different entity.",
        "operationId": "listTechnologyGroups",
        "parameters": [
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the group with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the group with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the groups with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the groups with these ids."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Groups whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Groups whose name equals this text exactly."
            }
          },
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Groups whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Groups whose name starts with this text."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Groups whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Groups whose name ends with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Groups whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Groups whose name contains this text."
            }
          },
          {
            "name": "TypeEnum",
            "in": "query",
            "description": "Groups of this kind (flexibleAsset, dataConfiguration, psa, domain, ssl, …).",
            "schema": {
              "enum": [
                "flexibleAsset",
                "dataConfiguration",
                "manual",
                "domain",
                "ssl",
                "psa"
              ],
              "type": "string",
              "description": "Groups of this kind (flexibleAsset, dataConfiguration, psa, domain, ssl, …)."
            }
          },
          {
            "name": "SectionId",
            "in": "query",
            "description": "Groups belonging to the section with this id (read a section id off any group's section object).",
            "schema": {
              "type": "integer",
              "description": "Groups belonging to the section with this id (read a section id off any group's section object).",
              "format": "int32"
            }
          },
          {
            "name": "SectionIdIn",
            "in": "query",
            "description": "Groups belonging to any of the sections with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Groups belonging to any of the sections with these ids."
            }
          },
          {
            "name": "IntegrationId",
            "in": "query",
            "description": "Groups synced from the integration with this id (read an integration id off any group's integration object).",
            "schema": {
              "type": "integer",
              "description": "Groups synced from the integration with this id (read an integration id off any group's integration object).",
              "format": "int32"
            }
          },
          {
            "name": "IntegrationIdIn",
            "in": "query",
            "description": "Groups synced from any of the integrations with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Groups synced from any of the integrations with these ids."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for technology groups. Allowed values: SortOrder, Name.",
            "schema": {
              "enum": [
                "sortOrder",
                "name"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for technology groups. Allowed values: SortOrder, Name."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "typeEnum",
                  "sortOrder",
                  "icon",
                  "columnCount",
                  "section",
                  "integration",
                  "viewSettings"
                ],
                "type": "string",
                "description": "Selectable response fields of a technology group (the fields query parameter). ViewSettings are\nclient configuration — which views the group appears in — and are read-only here; the current\nuser's own saved column filters and table settings are not exposed at all."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyGroupResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/technology/groups/{groupId}": {
      "get": {
        "tags": [
          "TechnologyGroups"
        ],
        "summary": "Returns one technology group of the caller's client by id, always in the Full shape. A group id\noutside your client is reported as notFound.\nWhen to use: module scope, needing no report and no part. getReportTechnologyGroup reads the same\ngroup through a draft report's part instead, and accepts the same groupId.\nNext: listTechnologyColumns and listTechnologyItems take this groupId; no reportId and no partId are\ninvolved in the module scope.",
        "description": "Returns one technology group of the caller's client by id, always in the Full shape. A group id\noutside your client is reported as notFound.\nWhen to use: module scope, needing no report and no part. getReportTechnologyGroup reads the same\ngroup through a draft report's part instead, and accepts the same groupId.\nNext: listTechnologyColumns and listTechnologyItems take this groupId; no reportId and no partId are\ninvolved in the module scope.",
        "operationId": "getTechnologyGroup",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyGroupResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/technology/groups/{groupId}/columns": {
      "get": {
        "tags": [
          "TechnologyGroups"
        ],
        "summary": "Lists the columns of a technology group, with typed filters, sorting, paging and field selection.\nInternal columns are never returned. Each column carries isEditable and patchPath, which say\nwhether — and through which JSON Patch path — patchTechnologyItem may write its data for an item;\nthey say nothing about patchTechnologyColumn, which edits the column definition itself. A group id\noutside your client is reported as notFound, never as an empty page.\nWhen to use: module scope. The columns of a group on a report part come from\nlistReportTechnologyColumns, which does return internal columns to internal roles; this scope\nreturns them to nobody.\nNext: returns the columnId taken by patchTechnologyColumn, by the sortBy of listTechnologyItems, and\nby the /columns/{columnId} path of patchTechnologyItem. The integrationId filter has no listing\noperation: read that value off a column's integration object.",
        "description": "Lists the columns of a technology group, with typed filters, sorting, paging and field selection.\nInternal columns are never returned. Each column carries isEditable and patchPath, which say\nwhether — and through which JSON Patch path — patchTechnologyItem may write its data for an item;\nthey say nothing about patchTechnologyColumn, which edits the column definition itself. A group id\noutside your client is reported as notFound, never as an empty page.\nWhen to use: module scope. The columns of a group on a report part come from\nlistReportTechnologyColumns, which does return internal columns to internal roles; this scope\nreturns them to nobody.\nNext: returns the columnId taken by patchTechnologyColumn, by the sortBy of listTechnologyItems, and\nby the /columns/{columnId} path of patchTechnologyItem. The integrationId filter has no listing\noperation: read that value off a column's integration object.",
        "operationId": "listTechnologyColumns",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the column with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the column with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the columns with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the columns with these ids."
            }
          },
          {
            "name": "NameEquals",
            "in": "query",
            "description": "Columns whose name equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Columns whose name equals this text exactly."
            }
          },
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Columns whose name starts with this text.",
            "schema": {
              "type": "string",
              "description": "Columns whose name starts with this text."
            }
          },
          {
            "name": "NameEndsWith",
            "in": "query",
            "description": "Columns whose name ends with this text.",
            "schema": {
              "type": "string",
              "description": "Columns whose name ends with this text."
            }
          },
          {
            "name": "NameContains",
            "in": "query",
            "description": "Columns whose name contains this text.",
            "schema": {
              "type": "string",
              "description": "Columns whose name contains this text."
            }
          },
          {
            "name": "IsEditable",
            "in": "query",
            "description": "Return only the columns an item patch may write (true), or only the read-only ones (false).",
            "schema": {
              "type": "boolean",
              "description": "Return only the columns an item patch may write (true), or only the read-only ones (false)."
            }
          },
          {
            "name": "IsActive",
            "in": "query",
            "description": "Filter by active flag.",
            "schema": {
              "type": "boolean",
              "description": "Filter by active flag."
            }
          },
          {
            "name": "IsRecurring",
            "in": "query",
            "description": "Filter by recurring flag.",
            "schema": {
              "type": "boolean",
              "description": "Filter by recurring flag."
            }
          },
          {
            "name": "TypeEnum",
            "in": "query",
            "description": "Columns of this kind (grade, month, customAppField, customIntegrationField, …).",
            "schema": {
              "enum": [
                "customAppField",
                "customIntegrationField",
                "grade",
                "month",
                "year",
                "oneTimeBudget",
                "recurringBudget",
                "recurringPeriod",
                "quantity",
                "recurringTotal",
                "effectiveDate",
                "cancellationDate",
                "company",
                "site",
                "status",
                "serialNumber",
                "name",
                "manufacturer",
                "purchaseDate",
                "expirationDate",
                "note",
                "productId",
                "soNotes",
                "lastLoginName",
                "configurationType",
                "model",
                "technologyTypeBudgetClass",
                "endOfLife",
                "initiativeItem"
              ],
              "type": "string",
              "description": "Columns of this kind (grade, month, customAppField, customIntegrationField, …)."
            }
          },
          {
            "name": "CustomColumnTypeEnum",
            "in": "query",
            "description": "Columns of this custom type (text, checkbox, date, link, singleSelectDropDown, class, …).",
            "schema": {
              "enum": [
                "singleSelectDropDown",
                "text",
                "date",
                "user",
                "checkbox",
                "link",
                "image",
                "number",
                "html",
                "age",
                "smartMemory",
                "smartOS",
                "class"
              ],
              "type": "string",
              "description": "Columns of this custom type (text, checkbox, date, link, singleSelectDropDown, class, …)."
            }
          },
          {
            "name": "SourceColumnId",
            "in": "query",
            "description": "Columns deriving their values from the column with this id.",
            "schema": {
              "type": "integer",
              "description": "Columns deriving their values from the column with this id.",
              "format": "int32"
            }
          },
          {
            "name": "SourceColumnIdIn",
            "in": "query",
            "description": "Columns deriving their values from any of the columns with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Columns deriving their values from any of the columns with these ids."
            }
          },
          {
            "name": "IntegrationId",
            "in": "query",
            "description": "Columns synced from the integration with this id.",
            "schema": {
              "type": "integer",
              "description": "Columns synced from the integration with this id.",
              "format": "int32"
            }
          },
          {
            "name": "IntegrationIdIn",
            "in": "query",
            "description": "Columns synced from any of the integrations with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Columns synced from any of the integrations with these ids."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for technology group columns. Allowed values: SortOrder, Name.",
            "schema": {
              "enum": [
                "sortOrder",
                "name"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for technology group columns. Allowed values: SortOrder, Name."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "typeEnum",
                  "isEditable",
                  "patchPath",
                  "description",
                  "sortOrder",
                  "isActive",
                  "isRecurring",
                  "customColumnTypeEnum",
                  "typeSettings",
                  "sourceColumnId",
                  "integration",
                  "viewSettings"
                ],
                "type": "string",
                "description": "Selectable response fields of a technology group column (the fields query parameter). IsInternal is\ndeliberately absent: an internal column is never returned across the external boundary, so the flag\nwould be a constant false."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyColumnResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/technology/groups/{groupId}/columns/{columnId}": {
      "patch": {
        "tags": [
          "TechnologyGroups"
        ],
        "summary": "Applies a JSON Patch to one column of a technology group and returns the updated column. Only\n/name, /description and /isActive are writable; an operation on any other path — including\n/sortOrder, which the app moves through a separate endpoint that re-sequences siblings — is\nrejected with validationFailed and nothing is written. This edits the column DEFINITION; to write\nan item's value in a column use patchTechnologyItem with the column's patchPath.\nWhen to use: module scope, on a columnId from listTechnologyColumns. patchReportTechnologyColumn\nwrites the same column definition through a draft report's part; either route changes it everywhere.",
        "description": "Applies a JSON Patch to one column of a technology group and returns the updated column. Only\n/name, /description and /isActive are writable; an operation on any other path — including\n/sortOrder, which the app moves through a separate endpoint that re-sequences siblings — is\nrejected with validationFailed and nothing is written. This edits the column DEFINITION; to write\nan item's value in a column use patchTechnologyItem with the column's patchPath.\nWhen to use: module scope, on a columnId from listTechnologyColumns. patchReportTechnologyColumn\nwrites the same column definition through a draft report's part; either route changes it everywhere.",
        "operationId": "patchTechnologyColumn",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "columnId",
            "in": "path",
            "description": "Column id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyColumnResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/technology/groups/{groupId}/items": {
      "get": {
        "tags": [
          "TechnologyGroups"
        ],
        "summary": "Lists the items of a technology group, with typed filters, paging and field selection. Items are\nscoped to your client AND to the companies you can see. sortBy takes a COLUMN ID from\nlistTechnologyColumns, not a field name; without it items come back ordered by id. Values of\ninternal columns are never returned. Note that inactive-status and unmapped items are hidden by\ndefault, matching the application — pass includeInactive / includeUnmapped to see them.\nWhen to use: module technology items need a groupId and nothing else — no reportId, no partId — and\nspan every company you can see. Use listReportTechnologyItems when the items must be one report's:\nit reads the same group but returns only the report's company, so this list is the wider of the two.\nNext: returns the itemId taken by patchTechnologyItem and by the entityIds of patchTechnologyItems.\nThe gradeId filter takes a value from listTechnologyGrades.",
        "description": "Lists the items of a technology group, with typed filters, paging and field selection. Items are\nscoped to your client AND to the companies you can see. sortBy takes a COLUMN ID from\nlistTechnologyColumns, not a field name; without it items come back ordered by id. Values of\ninternal columns are never returned. Note that inactive-status and unmapped items are hidden by\ndefault, matching the application — pass includeInactive / includeUnmapped to see them.\nWhen to use: module technology items need a groupId and nothing else — no reportId, no partId — and\nspan every company you can see. Use listReportTechnologyItems when the items must be one report's:\nit reads the same group but returns only the report's company, so this list is the wider of the two.\nNext: returns the itemId taken by patchTechnologyItem and by the entityIds of patchTechnologyItems.\nThe gradeId filter takes a value from listTechnologyGrades.",
        "operationId": "listTechnologyItems",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the item with this id.",
            "schema": {
              "type": "integer",
              "description": "Return only the item with this id.",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the items with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Return only the items with these ids."
            }
          },
          {
            "name": "CompanyId",
            "in": "query",
            "description": "Items belonging to the company with this id (see listCompanies).",
            "schema": {
              "type": "integer",
              "description": "Items belonging to the company with this id (see listCompanies).",
              "format": "int32"
            }
          },
          {
            "name": "CompanyIdIn",
            "in": "query",
            "description": "Items belonging to any of the companies with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items belonging to any of the companies with these ids."
            }
          },
          {
            "name": "GradeId",
            "in": "query",
            "description": "Items carrying the grade with this id (see listTechnologyGrades).",
            "schema": {
              "type": "integer",
              "description": "Items carrying the grade with this id (see listTechnologyGrades).",
              "format": "int32"
            }
          },
          {
            "name": "GradeIdIn",
            "in": "query",
            "description": "Items carrying any of the grades with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items carrying any of the grades with these ids."
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "description": "Items belonging to the site with this id.",
            "schema": {
              "type": "integer",
              "description": "Items belonging to the site with this id.",
              "format": "int32"
            }
          },
          {
            "name": "SiteIdIn",
            "in": "query",
            "description": "Items belonging to any of the sites with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items belonging to any of the sites with these ids."
            }
          },
          {
            "name": "StatusId",
            "in": "query",
            "description": "Items carrying the status with this id.",
            "schema": {
              "type": "integer",
              "description": "Items carrying the status with this id.",
              "format": "int32"
            }
          },
          {
            "name": "StatusIdIn",
            "in": "query",
            "description": "Items carrying any of the statuses with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Items carrying any of the statuses with these ids."
            }
          },
          {
            "name": "Month",
            "in": "query",
            "description": "Items whose period month equals this value (1-12).",
            "schema": {
              "maximum": 12,
              "minimum": 1,
              "type": "integer",
              "description": "Items whose period month equals this value (1-12).",
              "format": "int32"
            }
          },
          {
            "name": "Year",
            "in": "query",
            "description": "Items whose period year equals this value.",
            "schema": {
              "type": "integer",
              "description": "Items whose period year equals this value.",
              "format": "int32"
            }
          },
          {
            "name": "EffectiveDateAfter",
            "in": "query",
            "description": "Items whose effective date is on or after this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Items whose effective date is on or after this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "EffectiveDateBefore",
            "in": "query",
            "description": "Items whose effective date is on or before this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Items whose effective date is on or before this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "CancellationDateAfter",
            "in": "query",
            "description": "Items whose cancellation date is on or after this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Items whose cancellation date is on or after this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "CancellationDateBefore",
            "in": "query",
            "description": "Items whose cancellation date is on or before this date (UTC).",
            "schema": {
              "type": "string",
              "description": "Items whose cancellation date is on or before this date (UTC).",
              "format": "date-time"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Id of the COLUMN to sort by — take it from listTechnologyColumns, not a field name. An id that is not one of the group's columns is rejected. Omit it to sort by item id.",
            "schema": {
              "type": "integer",
              "description": "Id of the COLUMN to sort by — take it from listTechnologyColumns, not a field name. An id that is not one of the group's columns is rejected. Omit it to sort by item id.",
              "format": "int32"
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "company",
                  "grade",
                  "manualGradeId",
                  "autoGradeId",
                  "endOfLife",
                  "endOfLifeGrade",
                  "manualEndOfLife",
                  "autoEndOfLife",
                  "autoEndOfLifeByLifespan",
                  "autoEndOfLifeLifespanYears",
                  "autoEndOfLifeByOperatingSystem",
                  "autoEndOfLifeOperatingSystemName",
                  "month",
                  "manualMonth",
                  "autoMonth",
                  "year",
                  "manualYear",
                  "autoYear",
                  "oneTimeBudget",
                  "recurringBudget",
                  "recurringPeriod",
                  "recurringTotal",
                  "effectiveDate",
                  "cancellationDate",
                  "quantity",
                  "site",
                  "status",
                  "columns"
                ],
                "type": "string",
                "description": "Selectable response fields of a technology item (the fields query parameter)."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included."
            }
          },
          {
            "name": "IncludeInactive",
            "in": "query",
            "description": "Include items whose status is inactive. Defaults to false, matching what the application shows — so some of the group's items are hidden unless you set this.",
            "schema": {
              "type": "boolean",
              "description": "Include items whose status is inactive. Defaults to false, matching what the application shows — so some of the group's items are hidden unless you set this."
            }
          },
          {
            "name": "IncludeUnmapped",
            "in": "query",
            "description": "Include items not mapped to their integration. Defaults to false, matching what the application shows — so some of the group's items are hidden unless you set this.",
            "schema": {
              "type": "boolean",
              "description": "Include items not mapped to their integration. Defaults to false, matching what the application shows — so some of the group's items are hidden unless you set this."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyItemResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "TechnologyGroups"
        ],
        "summary": "Applies ONE JSON Patch to several items of a technology group, targeted by an explicit entityIds\nlist, and returns a per-item envelope: the items that updated, plus per-id errors for the rest. The\nbatch never fails as a whole once the request is valid. The wrapper is application/json and only the\nnested patch is an RFC 6902 array. An empty entityIds list is rejected — never read as \"every item\nin the group\" — and there is no filter-based targeting. A patch naming a non-editable column is\nrejected before ANY item is touched. A 200 is a completed outcome and is replayed by the idempotency\nlayer, so retrying the failures needs a fresh Idempotency-Key.\nWhen to use: module scope, one patch over several items of the same group, targeted by ids from\nlistTechnologyItems; for a single item use patchTechnologyItem.\nNot here: patchReportTechnologyItems is the same bulk patch through a draft report's part, where the\nreachable items are limited to the report's company.",
        "description": "Applies ONE JSON Patch to several items of a technology group, targeted by an explicit entityIds\nlist, and returns a per-item envelope: the items that updated, plus per-id errors for the rest. The\nbatch never fails as a whole once the request is valid. The wrapper is application/json and only the\nnested patch is an RFC 6902 array. An empty entityIds list is rejected — never read as \"every item\nin the group\" — and there is no filter-based targeting. A patch naming a non-editable column is\nrejected before ANY item is touched. A 200 is a completed outcome and is replayed by the idempotency\nlayer, so retrying the failures needs a fresh Idempotency-Key.\nWhen to use: module scope, one patch over several items of the same group, targeted by ids from\nlistTechnologyItems; for a single item use patchTechnologyItem.\nNot here: patchReportTechnologyItems is the same bulk patch through a draft report's part, where the\nreachable items are limited to the report's company.",
        "operationId": "patchTechnologyItems",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TechnologyItemsBulkPatchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyItemsBulkPatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/technology/groups/{groupId}/items/{itemId}": {
      "patch": {
        "tags": [
          "TechnologyGroups"
        ],
        "summary": "Applies a JSON Patch to one item of a technology group and returns the updated item. Intrinsic\nfields have their own paths (/gradeId, /month, /quantity, …); a column's value is written at\n/columns/{columnId}, but only for a column whose isEditable is true — naming any other column is\nrejected with validationFailed BEFORE anything is written, never silently ignored. Take the exact\npath from the column's patchPath. remove clears a scalar, or a column's values. A concurrent write\nto the same group is rejected with validationFailed; retry it.\nWhen to use: module scope, one item, on an itemId from listTechnologyItems; when the same patch\napplies to several items of the group use patchTechnologyItems. patchReportTechnologyItem writes the\nsame item through a draft report's part, where only the report's company is reachable.\nNot here: /gradeId takes a technology gradeId from listTechnologyGrades — grades are module-level, on\nthe sibling technology/grades routes, not per group.",
        "description": "Applies a JSON Patch to one item of a technology group and returns the updated item. Intrinsic\nfields have their own paths (/gradeId, /month, /quantity, …); a column's value is written at\n/columns/{columnId}, but only for a column whose isEditable is true — naming any other column is\nrejected with validationFailed BEFORE anything is written, never silently ignored. Take the exact\npath from the column's patchPath. remove clears a scalar, or a column's values. A concurrent write\nto the same group is rejected with validationFailed; retry it.\nWhen to use: module scope, one item, on an itemId from listTechnologyItems; when the same patch\napplies to several items of the group use patchTechnologyItems. patchReportTechnologyItem writes the\nsame item through a draft report's part, where only the report's company is reachable.\nNot here: /gradeId takes a technology gradeId from listTechnologyGrades — grades are module-level, on\nthe sibling technology/grades routes, not per group.",
        "operationId": "patchTechnologyItem",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "Item id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonPatchDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TechnologyItemResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Lists the users of the caller's client, with typed filters, sorting, paging and field\nselection. Phone numbers are not available here — use getUser.\nWhen to use: to find a userId by name, email, active flag or territory, or to page the whole\ndirectory; getUser is the single-id lookup and the only source of the phone number.\nNext: returns the string-GUID userId taken by createCompanyGroup.userIds and\nupdateCompanyGroup.userIds, by patchReport /preparedByUserId, and by the listReports\npreparedByUserId and listPlans ownerId filters. This directory is Admin/Manager only, so a\ncaller that cannot read it takes a report's preparer from the preparedByUser object (id plus\nfirst and last name) that listReports and getReport return in the Full view.",
        "description": "Lists the users of the caller's client, with typed filters, sorting, paging and field\nselection. Phone numbers are not available here — use getUser.\nWhen to use: to find a userId by name, email, active flag or territory, or to page the whole\ndirectory; getUser is the single-id lookup and the only source of the phone number.\nNext: returns the string-GUID userId taken by createCompanyGroup.userIds and\nupdateCompanyGroup.userIds, by patchReport /preparedByUserId, and by the listReports\npreparedByUserId and listPlans ownerId filters. This directory is Admin/Manager only, so a\ncaller that cannot read it takes a report's preparer from the preparedByUser object (id plus\nfirst and last name) that listReports and getReport return in the Full view.",
        "operationId": "listUsers",
        "parameters": [
          {
            "name": "NameStartsWith",
            "in": "query",
            "description": "Users whose full name (first and last) starts with this text. A bare last name also matches, so both 'John Sm' and 'Sm' find John Smith.",
            "schema": {
              "type": "string",
              "description": "Users whose full name (first and last) starts with this text. A bare last name also matches, so both 'John Sm' and 'Sm' find John Smith."
            }
          },
          {
            "name": "EmailEquals",
            "in": "query",
            "description": "Users whose email equals this text exactly.",
            "schema": {
              "type": "string",
              "description": "Users whose email equals this text exactly."
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Return only the user with this id.",
            "schema": {
              "type": "string",
              "description": "Return only the user with this id."
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Return only the users with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Return only the users with these ids."
            }
          },
          {
            "name": "IsActive",
            "in": "query",
            "description": "Filter by the active flag.",
            "schema": {
              "type": "boolean",
              "description": "Filter by the active flag."
            }
          },
          {
            "name": "GroupId",
            "in": "query",
            "description": "Users belonging to the group (territory) with this id.",
            "schema": {
              "type": "integer",
              "description": "Users belonging to the group (territory) with this id.",
              "format": "int32"
            }
          },
          {
            "name": "GroupIdIn",
            "in": "query",
            "description": "Users belonging to any of the groups (territories) with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Users belonging to any of the groups (territories) with these ids."
            }
          },
          {
            "name": "RoleId",
            "in": "query",
            "description": "Users with the role of this id. Role ids are strings.",
            "schema": {
              "type": "string",
              "description": "Users with the role of this id. Role ids are strings."
            }
          },
          {
            "name": "RoleIdIn",
            "in": "query",
            "description": "Users with any of the roles of these ids. Role ids are strings.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Users with any of the roles of these ids. Role ids are strings."
            }
          },
          {
            "name": "CompanyId",
            "in": "query",
            "description": "Users assigned to the company with this id.",
            "schema": {
              "type": "integer",
              "description": "Users assigned to the company with this id.",
              "format": "int32"
            }
          },
          {
            "name": "CompanyIdIn",
            "in": "query",
            "description": "Users assigned to any of the companies with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Users assigned to any of the companies with these ids."
            }
          },
          {
            "name": "TemplateId",
            "in": "query",
            "description": "Users assigned to the template with this id.",
            "schema": {
              "type": "integer",
              "description": "Users assigned to the template with this id.",
              "format": "int32"
            }
          },
          {
            "name": "TemplateIdIn",
            "in": "query",
            "description": "Users assigned to any of the templates with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Users assigned to any of the templates with these ids."
            }
          },
          {
            "name": "ModuleId",
            "in": "query",
            "description": "Users assigned to the module with this id.",
            "schema": {
              "type": "integer",
              "description": "Users assigned to the module with this id.",
              "format": "int32"
            }
          },
          {
            "name": "ModuleIdIn",
            "in": "query",
            "description": "Users assigned to any of the modules with these ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "description": "Users assigned to any of the modules with these ids."
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Whitelisted sortable fields for users (indexed/cheap columns only). Allowed values: Name,\nEmail, LastLogin.",
            "schema": {
              "enum": [
                "name",
                "email",
                "lastLogin"
              ],
              "type": "string",
              "description": "Whitelisted sortable fields for users (indexed/cheap columns only). Allowed values: Name,\nEmail, LastLogin."
            }
          },
          {
            "name": "View",
            "in": "query",
            "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request.",
            "schema": {
              "enum": [
                "summary",
                "full"
              ],
              "type": "string",
              "description": "Preset field-sets for external resources. Allowed values: Summary, Full. Ignored when an\nexplicit fields selection is provided on the request."
            }
          },
          {
            "name": "Fields",
            "in": "query",
            "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included. 'phoneNumber' is not a list field and is rejected.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "id",
                  "name",
                  "email",
                  "isActive",
                  "role",
                  "groups",
                  "firstName",
                  "lastName",
                  "position",
                  "lastLogin",
                  "companies",
                  "templates",
                  "defaultUserTemplate",
                  "defaultUserGroup",
                  "modules",
                  "isApiUser"
                ],
                "type": "string",
                "description": "Selectable response fields of a user (used by the fields query parameter).\nPhoneNumber is deliberately absent: it is returned by getUser only, so requesting it on the\nlist is an unknown field and fails validation."
              },
              "description": "Exact fields to return. When set, overrides 'view'. The 'id' field is always included. 'phoneNumber' is not a list field and is rejected."
            }
          },
          {
            "name": "SortDir",
            "in": "query",
            "description": "Sort direction for external list endpoints. Allowed values: asc, desc.",
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string",
              "description": "Sort direction for external list endpoints. Allowed values: asc, desc."
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "1-based page number. Defaults to 1.",
            "schema": {
              "type": "integer",
              "description": "1-based page number. Defaults to 1.",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Items per page. Capped at 100. Defaults to 25.",
            "schema": {
              "type": "integer",
              "description": "Items per page. Capped at 100. Defaults to 25.",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResourceExternalPagedResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Users/{id}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Returns one user of the caller's client by id, including the phone number. The id is a\nstring GUID: a value that is not a GUID is rejected with 400 validationFailed, while a\nwell-formed id outside the caller's client is reported as not found.\nWhen to use: you already hold a userId — from listUsers, or from preparedByUser on\nlistReports/getReport or owner on listPlans/getPlan, both Full view — and need the phone\nnumber, which the list never returns; search the directory with listUsers instead.\nNext: the same id is taken by createCompanyGroup.userIds, updateCompanyGroup.userIds,\npatchReport /preparedByUserId, listReports preparedByUserId and listPlans ownerId.",
        "description": "Returns one user of the caller's client by id, including the phone number. The id is a\nstring GUID: a value that is not a GUID is rejected with 400 validationFailed, while a\nwell-formed id outside the caller's client is reported as not found.\nWhen to use: you already hold a userId — from listUsers, or from preparedByUser on\nlistReports/getReport or owner on listPlans/getPlan, both Full view — and need the phone\nnumber, which the list never returns; search the directory with listUsers instead.\nNext: the same id is taken by createCompanyGroup.userIds, updateCompanyGroup.userIds,\npatchReport /preparedByUserId, listReports preparedByUserId and listPlans ownerId.",
        "operationId": "getUser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User id (a string GUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Users/{id}/groups": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Adds one or more groups to a user and returns the user, exactly as getUser reads it.\nWhen to use: to give a user access to a group's companies without resending the user's whole\ngroup list. groupIds come from listCompanyGroups; an id outside your tenant is not found and\nNOTHING is written. A group already on the user is accepted and left untouched. Admin and\nBilling users cannot hold groups and are refused. Send an Idempotency-Key so a retry replays\nthe first response.\nNext: removeUserGroup takes one group away; getUser shows the current set.\nNot here: creating a group (createCompanyGroup) or editing the group's own member list\n(updateCompanyGroup).",
        "description": "Adds one or more groups to a user and returns the user, exactly as getUser reads it.\nWhen to use: to give a user access to a group's companies without resending the user's whole\ngroup list. groupIds come from listCompanyGroups; an id outside your tenant is not found and\nNOTHING is written. A group already on the user is accepted and left untouched. Admin and\nBilling users cannot hold groups and are refused. Send an Idempotency-Key so a retry replays\nthe first response.\nNext: removeUserGroup takes one group away; getUser shows the current set.\nNot here: creating a group (createCompanyGroup) or editing the group's own member list\n(updateCompanyGroup).",
        "operationId": "addUserGroups",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User id (a string GUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserGroupsAddInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResourceExternalResponse"
                }
              }
            }
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/Users/{id}/groups/{groupId}": {
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Removes one group from a user and returns no content.\nWhen to use: to take a group's companies away from a user. The groupId comes from getUser; a group\nthat is not on the user is reported as not found. Refused when it is the user's last group, or\nwhen a company assigned to the user would no longer share any group with them; the message\nnames those companies. If it was the user's default group, the default is cleared.\nNext: getUser no longer lists the group; addUserGroups puts it back.\nNot here: deleting the group itself (deleteCompanyGroup).",
        "description": "Removes one group from a user and returns no content.\nWhen to use: to take a group's companies away from a user. The groupId comes from getUser; a group\nthat is not on the user is reported as not found. Refused when it is the user's last group, or\nwhen a company assigned to the user would no longer share any group with them; the message\nnames those companies. If it was the user's default group, the default is cleared.\nNext: getUser no longer lists the group; addUserGroups puts it back.\nNot here: deleting the group itself (deleteCompanyGroup).",
        "operationId": "removeUserGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User id (a string GUID).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "description": "Group id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional idempotency key: 1-255 characters from [A-Za-z0-9_-] (a UUID is ideal). Generate a FRESH key for each distinct operation, and reuse the SAME key ONLY when retrying that exact request. A retry with the same key and body replays the original response; the same key with a different body is rejected (422). Omit the header to run without idempotency.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "validationFailed — the request is malformed, or a value or patch path is not accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "401": {
            "description": "unauthenticated — no valid bearer token or API key was supplied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "403": {
            "description": "accessDenied — the caller is authenticated but not allowed this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "404": {
            "description": "notFound — the addressed resource does not exist or is not visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "429": {
            "description": "rateLimited — too many concurrent requests or the database is under pressure; wait for Retry-After and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "500": {
            "description": "internalError — an unexpected server fault; the requestId identifies it in the logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "409": {
            "description": "requestInProgress — another request with the same Idempotency-Key is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          },
          "422": {
            "description": "idempotencyKeyReused — the Idempotency-Key was already used with a different request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AiAssessmentWriteRowResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "update_assessment_item_for_clients: the client the row is about; omitted where the scope names the client.",
            "nullable": true
          },
          "template": {
            "type": "string",
            "description": "update_assessment_item_for_clients: the template of the client's draft the row is on; omitted when the call names a template (the answer carries it) and where the scope names it.",
            "nullable": true
          },
          "item": {
            "type": "string",
            "description": "The item the row is about: its name on the draft when written, otherwise as the row named it.",
            "nullable": true
          },
          "group": {
            "type": "string",
            "description": "The assessment group of the item copy written, or the group the row named.",
            "nullable": true
          },
          "grade": {
            "type": "string",
            "description": "Written rows: the item's grade name after the write, omitted when it has none.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Written rows: the item's status after the write.",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "description": "Skipped rows: why nothing was written for the row. Ambiguous rows: what to do next.",
            "nullable": true
          },
          "parameter": {
            "type": "string",
            "description": "Ambiguous rows, and skipped rows whose name matched nothing: the parameter to correct (item, group or grade; for update_assessment_item_for_clients also client or template); call again with it set to the exact name, one of the candidates when they are listed.",
            "nullable": true
          },
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiCandidateResource"
            },
            "description": "Ambiguous rows: the matching names (up to 10). Skipped rows whose name matched nothing: the nearest names (up to 5), omitted only when there were no names to compare with. Each with a hint when one is available.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One row of an assessment bulk write's answer, by name only: written (the item's grade and status after the write),\nskipped (why; for a name that matched nothing also the parameter and the nearest names) or ambiguous (the parameter\nto correct and its candidates). Members a row does not use are omitted."
      },
      "AiCandidateResource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The exact name; call again with it.",
            "nullable": true
          },
          "hint": {
            "type": "string",
            "description": "What tells this name apart from same-named ones (e.g. the item's group), or null.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A name the caller may have meant."
      },
      "AiClientHealthRowResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "healthScore": {
            "type": "integer",
            "description": "Health score 0-100: stored for a completed report, computed live for a draft; null when no graded item counts toward health.",
            "format": "int32",
            "nullable": true
          },
          "reportDate": {
            "type": "string",
            "description": "Date of the report the score was read from (UTC).",
            "format": "date-time"
          },
          "reportStatus": {
            "enum": [
              "archive",
              "completed",
              "draft"
            ],
            "type": "string",
            "description": "Lifecycle status of that report: draft or completed."
          }
        },
        "additionalProperties": false,
        "description": "One client's health score, read from its report in scope."
      },
      "AiClientItemRowResource": {
        "type": "object",
        "properties": {
          "item": {
            "type": "string",
            "description": "Name of the item.",
            "nullable": true
          },
          "group": {
            "type": "string",
            "description": "Name of the assessment group the item belongs to.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status value of the item.",
            "nullable": true
          },
          "grade": {
            "type": "string",
            "description": "Name of the item's grade, or null when it has none.",
            "nullable": true
          },
          "graded": {
            "type": "boolean",
            "description": "Whether the item's grade was changed from the template default."
          },
          "risk": {
            "type": "string",
            "description": "Risk value of the item.",
            "nullable": true
          },
          "solution": {
            "type": "string",
            "description": "Solution value of the item.",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "string",
            "description": "One-time budget as entered, or null.",
            "nullable": true
          },
          "recurringBudget": {
            "type": "string",
            "description": "Recurring budget as entered, or null.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One item of the client's report (the client is in scope). A column not selected by fields is omitted."
      },
      "AiDisambiguationResource": {
        "type": "object",
        "properties": {
          "parameter": {
            "type": "string",
            "description": "The request parameter that matched several names, e.g. client, item, grade, plan, category or source: set it to one candidate's exact name and call again.",
            "nullable": true
          },
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiCandidateResource"
            },
            "description": "The matching names (up to 10), each with a hint when one is available.",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Set when more names matched than are listed.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Several names matched one parameter, so nothing was read: ask which one is meant, then call again with its\nexact name."
      },
      "AiGradeCountResource": {
        "type": "object",
        "properties": {
          "grade": {
            "type": "string",
            "description": "Grade name; same-named grades of several templates are counted together.",
            "nullable": true
          },
          "count": {
            "type": "integer",
            "description": "Number of matching items with this grade.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "The number of matching items carrying one grade name."
      },
      "AiItemAcrossClientsRowResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status value of the item on this client's report.",
            "nullable": true
          },
          "grade": {
            "type": "string",
            "description": "Name of the item's grade on this client's report, or null when it has none.",
            "nullable": true
          },
          "graded": {
            "type": "boolean",
            "description": "Whether the item's grade was changed from the template default."
          },
          "reportDate": {
            "type": "string",
            "description": "Date of the client's report the item was read from (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "reportStatus": {
            "enum": [
              "archive",
              "completed",
              "draft"
            ],
            "type": "string",
            "description": "Lifecycle status of that report: draft or completed.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One client's copy of the item the answer is about (the item is in scope). A column not selected by fields\nis omitted."
      },
      "AiLinkRowResource": {
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "initiative",
              "plan",
              "planItem",
              "goal",
              "technologyItem",
              "finding"
            ],
            "type": "string",
            "description": "What a link tool's written or refused row names: an initiative item, a whole plan, a plan row, a goal, a technology\nitem or an assessment finding."
          },
          "name": {
            "type": "string",
            "description": "The record's name as the call resolved it; a plan row's own name.",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "Why the record was not linked (or not unlinked), naming the records; omitted on a written row.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One record a link tool wrote or refused, by name only: what it is, its name, and why it was refused."
      },
      "AiReportRefResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the report, for follow-up calls such as getReport or listReportAssessmentItems.",
            "format": "int32"
          },
          "date": {
            "type": "string",
            "description": "Date of the report (UTC).",
            "format": "date-time"
          },
          "status": {
            "enum": [
              "archive",
              "completed",
              "draft"
            ],
            "type": "string",
            "description": "Lifecycle status of the report: draft or completed."
          }
        },
        "additionalProperties": false,
        "description": "The one report the answer was read from."
      },
      "AiScopeResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "The client name the request resolved to, or null when no client was asked.",
            "nullable": true
          },
          "item": {
            "type": "string",
            "description": "The item name the request resolved to, or null when no item was asked; update_goal and create_goal: the goal's name; update_project, link_project and unlink_project: the project's name.",
            "nullable": true
          },
          "grade": {
            "type": "string",
            "description": "The grade name the request resolved to, or null when no grade was asked.",
            "nullable": true
          },
          "report": {
            "enum": [
              "latest",
              "latestDraft",
              "latestCompleted"
            ],
            "type": "string",
            "description": "Which report of each client was read: latest, latestDraft or latestCompleted; omitted by the tools that read no report.",
            "nullable": true
          },
          "reportRef": {
            "$ref": "#/components/schemas/AiReportRefResource"
          },
          "template": {
            "type": "string",
            "description": "The report template name: query_schedule, when one template is in scope (asked, or the only one you can see); query_assessment, when template was asked; grade_assessment_item and update_assessment_items, the template of the draft written; create_assessment_draft, the template of the draft created or refused; create_goal: the goal template the goal was created from.",
            "nullable": true
          },
          "group": {
            "type": "string",
            "description": "query_assessment (singleItem), grade_assessment_item: the assessment group name the request resolved to, or null when no group was asked.",
            "nullable": true
          },
          "primaryUser": {
            "type": "string",
            "description": "query_schedule: the primary user's full name the request resolved to, or null when none was asked.",
            "nullable": true
          },
          "primaryUserLabel": {
            "type": "string",
            "description": "query_schedule: what the template in scope calls its primary user (e.g. \"vCIO\"), when one template is in scope.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "query_initiatives, query_plans, query_goals, query_projects and query_proposals (the PSA status name), update_goal, create_goal: the status label the request resolved to, or null when no status was asked.",
            "nullable": true
          },
          "plan": {
            "type": "string",
            "description": "query_plans, update_plan_item, create_plan_item, create_initiative_from_finding: the plan name the request resolved to, or null when no plan was asked.",
            "nullable": true
          },
          "part": {
            "type": "string",
            "description": "update_plan_item: the label of the plan part the item is in; create_plan_item, create_initiative_from_finding: the part the item was created in.",
            "nullable": true
          },
          "target": {
            "enum": [
              "initiative",
              "plan"
            ],
            "type": "string",
            "description": "create_initiative_from_finding: where the item was created, initiative or plan.",
            "nullable": true
          },
          "tag": {
            "type": "string",
            "description": "query_initiatives: the tag name the request resolved to, or null when no tag was asked.",
            "nullable": true
          },
          "assignee": {
            "type": "string",
            "description": "query_initiatives: the assignee's full name the request resolved to, or null when no assignee was asked.",
            "nullable": true
          },
          "owner": {
            "type": "string",
            "description": "query_goals, update_goal, create_goal: the goal owner's full name the request resolved to; query_proposals: the proposal owner's (sales rep's) name; null when no owner was asked.",
            "nullable": true
          },
          "category": {
            "type": "string",
            "description": "query_technology: the category the request resolved to, with the number of groups when it spans several (\"Workstations (2 groups)\").",
            "nullable": true
          },
          "source": {
            "type": "string",
            "description": "query_technology: the one integration the matched technology comes from, asked or the only one.",
            "nullable": true
          },
          "board": {
            "type": "string",
            "description": "query_projects: the project board name the request resolved to, or null when no board was asked.",
            "nullable": true
          },
          "manager": {
            "type": "string",
            "description": "query_projects: the project manager's name the request resolved to, or null when no manager was asked.",
            "nullable": true
          },
          "stage": {
            "type": "string",
            "description": "query_proposals: the PSA stage name the request resolved to, or null when no stage was asked.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "What the answer is about, hoisted out of its rows: the resolved names and the report choice."
      },
      "AiSingleItemResource": {
        "type": "object",
        "properties": {
          "filledOut": {
            "type": "boolean",
            "description": "Whether the item's status is filled out (not empty)."
          },
          "graded": {
            "type": "boolean",
            "description": "Whether the item's grade was changed from the template default."
          },
          "status": {
            "type": "string",
            "description": "Status value of the item.",
            "nullable": true
          },
          "risk": {
            "type": "string",
            "description": "Risk value of the item.",
            "nullable": true
          },
          "solution": {
            "type": "string",
            "description": "Solution value of the item.",
            "nullable": true
          },
          "grade": {
            "type": "string",
            "description": "Name of the item's grade, or null when it has none.",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "string",
            "description": "One-time budget as entered, or null.",
            "nullable": true
          },
          "recurringBudget": {
            "type": "string",
            "description": "Recurring budget as entered, or null.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One item on one client's report. A column not selected by fields is omitted."
      },
      "AiWithoutScoreLineResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "reason": {
            "enum": [
              "noReport",
              "latestReportArchived",
              "noScore"
            ],
            "type": "string",
            "description": "noReport = no report in scope; latestReportArchived = (report=latest) the client's newest report is archived, so nothing is in scope; noScore = its report in scope has no graded item that counts toward health."
          }
        },
        "additionalProperties": false,
        "description": "One client without a health score, with the reason."
      },
      "AssessmentItemGradeResource": {
        "type": "object",
        "properties": {
          "templateGradeId": {
            "type": "integer",
            "description": "Id of the template grade this grade was copied from (see listReportAssessmentGrades).",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name of the grade.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the template's default grade, i.e. the item has not been graded yet."
          }
        },
        "additionalProperties": false,
        "description": "The grade set on an assessment item, slimmed to what a cross-report question needs."
      },
      "AssessmentItemResource": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "integer",
            "description": "Id of the company the report belongs to.",
            "format": "int32",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "description": "Name of the company.",
            "nullable": true
          },
          "reportId": {
            "type": "integer",
            "description": "Id of the report the item is on.",
            "format": "int32",
            "nullable": true
          },
          "reportDate": {
            "type": "string",
            "description": "Date of the report (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "reportStatusEnum": {
            "enum": [
              "archive",
              "completed",
              "draft"
            ],
            "type": "string",
            "description": "Lifecycle status of the report: draft or completed.",
            "nullable": true
          },
          "itemId": {
            "type": "integer",
            "description": "Unique identifier of the item: the itemId getReportAssessmentItem and patchReportAssessmentItem take together with reportId. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "templateItemId": {
            "type": "integer",
            "description": "Id of the template item this item was created from, or null for manual items.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name of the item.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status value of the item.",
            "nullable": true
          },
          "risk": {
            "type": "string",
            "description": "Risk value of the item.",
            "nullable": true
          },
          "solution": {
            "type": "string",
            "description": "Solution value of the item.",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "string",
            "description": "One-time budget as entered, or null.",
            "nullable": true
          },
          "recurringBudget": {
            "type": "string",
            "description": "Recurring budget as entered, or null.",
            "nullable": true
          },
          "grade": {
            "$ref": "#/components/schemas/AssessmentItemGradeResource"
          },
          "groupId": {
            "type": "integer",
            "description": "Id of the assessment group the item belongs to.",
            "format": "int32",
            "nullable": true
          },
          "groupName": {
            "type": "string",
            "description": "Name of the assessment group the item belongs to.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An assessment item of one of the caller's reports, with its report and company. Every value member is\nnullable because the list projects this resource through the fields/view selection: an unselected\nfield stays null and disappears from the JSON instead of serializing a default."
      },
      "AssessmentItemResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssessmentItemResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "AssessmentItemUpdateRowInput": {
        "required": [
          "item"
        ],
        "type": "object",
        "properties": {
          "item": {
            "minLength": 1,
            "type": "string",
            "description": "Assessment item name on the client's draft report, exact (case aside), e.g. \"Backup\". A partial name or several matches put the row in ambiguous with candidates; the row writes nothing."
          },
          "group": {
            "type": "string",
            "description": "Assessment group name on the draft, e.g. \"Continuity\": picks the copy of item in that group when the item name sits on the draft more than once (without it such a row is ambiguous with the groups as candidates).",
            "nullable": true
          },
          "grade": {
            "type": "string",
            "description": "Grade name, e.g. \"Healthy\": one of the grades of the draft report's template; omit it, or send it empty or blank, to leave the grade unchanged.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status text to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "risk": {
            "type": "string",
            "description": "Risk text to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "solution": {
            "type": "string",
            "description": "Solution text to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "string",
            "description": "One-time budget to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "recurringBudget": {
            "type": "string",
            "description": "Recurring budget to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One row of update_assessment_items: an item of the client's draft by name and the values to write on it, at least\none of them. A member left out is left as it is on the item."
      },
      "AssessmentItemsGradeCountResource": {
        "type": "object",
        "properties": {
          "templateGradeId": {
            "type": "integer",
            "description": "Id of the template grade (see listReportAssessmentGrades).",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name of the grade as stored on the items.",
            "nullable": true
          },
          "count": {
            "type": "integer",
            "description": "Number of matching items with this grade.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "The number of matching items carrying one grade."
      },
      "AssessmentItemsSummaryResource": {
        "type": "object",
        "properties": {
          "companies": {
            "type": "integer",
            "description": "Companies you can see (narrowed by companyIdIn).",
            "format": "int32"
          },
          "withReport": {
            "type": "integer",
            "description": "Companies with at least one report in scope.",
            "format": "int32"
          },
          "graded": {
            "type": "integer",
            "description": "Matching items whose grade differs from the template's default grade.",
            "format": "int32"
          },
          "ungraded": {
            "type": "integer",
            "description": "Matching items still on the template's default grade, or with no grade.",
            "format": "int32"
          },
          "noReport": {
            "type": "integer",
            "description": "Companies with no report in scope (archived reports are never in scope, so under latestPerCompany this includes a company whose newest report is archived).",
            "format": "int32"
          },
          "notOnReport": {
            "type": "integer",
            "description": "Companies with a report in scope but no matching item on it.",
            "format": "int32"
          },
          "byGrade": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssessmentItemsGradeCountResource"
            },
            "description": "Matching items per grade, the default grade included; ungraded items have no entry.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Counts over the caller's companies and the matching assessment items of their reports in scope.\ncompanies, withReport, noReport and notOnReport count companies; graded, ungraded and byGrade count\nitems, so graded + ungraded + notOnReport + noReport = companies only when every company has at\nmost one matching item on its scoped report (a template item can appear twice on one report)."
      },
      "AssessmentItemsSummaryResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AssessmentItemsSummaryResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "BriefAttentionItemResource": {
        "type": "object",
        "properties": {
          "item": {
            "type": "string",
            "description": "Assessment item name.",
            "nullable": true
          },
          "group": {
            "type": "string",
            "description": "The report group the item sits in.",
            "nullable": true
          },
          "grade": {
            "type": "string",
            "description": "The item's grade name, e.g. Danger.",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "string",
            "description": "One-time budget as entered on the report; omitted when blank.",
            "nullable": true
          },
          "recurringBudget": {
            "type": "string",
            "description": "Recurring budget as entered on the report; omitted when blank.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An assessment item graded below healthy on the client's report."
      },
      "BriefClientResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "report": {
            "$ref": "#/components/schemas/AiReportRefResource"
          },
          "healthScore": {
            "type": "integer",
            "description": "Health score 0-100 of that report: stored for a completed report, computed live for a draft; omitted when no graded item counts toward health.",
            "format": "int32",
            "nullable": true
          },
          "graded": {
            "type": "integer",
            "description": "Items on the report whose grade was changed from the template default.",
            "format": "int32"
          },
          "ungraded": {
            "type": "integer",
            "description": "Items on the report on the default grade or with no grade.",
            "format": "int32"
          },
          "attentionItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefAttentionItemResource"
            },
            "description": "Items graded below healthy (a grade that counts toward health, is not healthy and is not the default), in report order, up to 20; note says when more are.",
            "nullable": true
          },
          "openInitiatives": {
            "type": "integer",
            "description": "The client's open initiatives: status not flagged completed. Omitted, with a note, when your role cannot read initiative items or their status.",
            "format": "int32",
            "nullable": true
          },
          "initiatives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefInitiativeResource"
            },
            "description": "The 5 most recently updated open initiatives.",
            "nullable": true
          },
          "goals": {
            "$ref": "#/components/schemas/BriefGoalsResource"
          },
          "proposals": {
            "$ref": "#/components/schemas/BriefProposalsResource"
          },
          "schedule": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefScheduleLineResource"
            },
            "description": "The client's report schedules this year as query_schedule rates them, worst first, up to 5; omitted, with a note, when the client has no scheduled report.",
            "nullable": true
          },
          "m365": {
            "$ref": "#/components/schemas/M365ClientPostureResource"
          },
          "technology": {
            "$ref": "#/components/schemas/BriefTechnologyResource"
          },
          "plan": {
            "$ref": "#/components/schemas/BriefPlanResource"
          },
          "note": {
            "type": "string",
            "description": "Sentences to pass on with the briefing: why a section is omitted (no report, no scheduled report, no Microsoft 365 data, not visible to your role) or that more is there than listed.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One client's briefing, read from its latest report and its initiatives, with the goals, proposals, schedule,\nMicrosoft 365, technology and next-quarter plan sections the module intent tools answer for it."
      },
      "BriefGoalResource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Goal name.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label (Planned, On track, At risk or Done); omitted when the goal has none.",
            "nullable": true
          },
          "progress": {
            "type": "integer",
            "description": "Progress in percent, 0-100, as stored: it does not follow the status.",
            "format": "int32"
          },
          "targetDate": {
            "type": "string",
            "description": "Target date, yyyy-MM-dd; omitted when not set.",
            "nullable": true
          },
          "owner": {
            "type": "string",
            "description": "The owner's full name (a deleted user's name as it was); omitted when the goal has no owner.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A goal of the client that is at risk or overdue."
      },
      "BriefGoalsResource": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "The client's goals the Goals module shows you.",
            "format": "int32"
          },
          "byStatus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalCountLineResource"
            },
            "description": "The goals by status as query_goals counts them: every status option in its order, a zero count included, then \"(none)\" for the goals with no status or with a status id no option carries; ask query_goals for the quarters or the rows.",
            "nullable": true
          },
          "atRiskGoals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefGoalResource"
            },
            "description": "The goals at risk, or past their target date and not Done: the earliest target date first, those without one last, up to 5; note says when more are.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The client's goals as query_goals counts them for the client: the Goals module's own access rule (Goals_Items Read;\nthe companies the module shows you). Omitted, with a note, when your role cannot read goals or the module does not\nshow you the client."
      },
      "BriefInitiativeResource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Initiative name; omitted when the Name column is internal and your role cannot see internal columns.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label, e.g. In Progress.",
            "nullable": true
          },
          "month": {
            "type": "integer",
            "description": "Planned month, 1-12.",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Planned year.",
            "format": "int32",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "number",
            "description": "One-time budget.",
            "format": "double",
            "nullable": true
          },
          "recurringBudget": {
            "type": "number",
            "description": "Recurring budget.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An open initiative of the client."
      },
      "BriefInput": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and no data. Omit it for the portfolio triage over every client you can see.",
            "nullable": true
          },
          "template": {
            "type": "string",
            "description": "Report template name, e.g. \"Quarterly Business Review\": each client's latest report is picked among that template's reports only. Omit to pick across every template. Same name rules as client.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of brief: a client name for that client's briefing, or no client for the portfolio triage."
      },
      "BriefMfaLineResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "users": {
            "type": "integer",
            "description": "Live users (members and guests, blocked accounts left out).",
            "format": "int32"
          },
          "admins": {
            "type": "integer",
            "description": "Admins: reported admin, or holding at least one directory role.",
            "format": "int32"
          },
          "adminsWithoutMfa": {
            "type": "integer",
            "description": "Admins not registered for MFA.",
            "format": "int32"
          },
          "withoutMfa": {
            "type": "integer",
            "description": "Users known not to be registered for MFA; users whose MFA state is not reported are not counted.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "One client of the portfolio's weakest MFA, from its synced Microsoft 365 users (query_m365_users' counts: MFA\nmeans registered, not enforced)."
      },
      "BriefPlanResource": {
        "type": "object",
        "properties": {
          "quarter": {
            "type": "string",
            "description": "The calendar quarter read, e.g. 2026-Q4 (January-March is Q1).",
            "nullable": true
          },
          "totals": {
            "$ref": "#/components/schemas/PlanBudgetTotalsResource"
          },
          "unparsedBudgets": {
            "type": "integer",
            "description": "Budget values of those items that could not be read as a number and are left out of the sums; omitted when none.",
            "format": "int32",
            "nullable": true
          },
          "nonCalendarYear": {
            "type": "integer",
            "description": "The client's plan items whose year is not a calendar year (e.g. 3): in no quarter, so left out of the totals; note says so. Omitted when none.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The client's plan items in the next calendar quarter, as query_plans totals them: the standalone plans you can\nopen (both plan rules), every row counted. Omitted, with a note, when your role lacks Plan_Plan, Plan_PlanParts or\nPlan_ManualItems Read."
      },
      "BriefPortfolioClientLineResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "healthScore": {
            "type": "integer",
            "description": "Health score 0-100: stored for a completed report, computed live for a draft; omitted when no graded item counts toward health.",
            "format": "int32",
            "nullable": true
          },
          "ungraded": {
            "type": "integer",
            "description": "Items on the report on the default grade or with no grade.",
            "format": "int32"
          },
          "reportDate": {
            "type": "string",
            "description": "Date of the report (UTC).",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "One client of the portfolio triage, read from its latest report."
      },
      "BriefPortfolioResource": {
        "type": "object",
        "properties": {
          "clients": {
            "type": "integer",
            "description": "The clients you can see: withReport + noReport.",
            "format": "int32"
          },
          "withReport": {
            "type": "integer",
            "description": "Clients with a report in scope (their latest report is a draft or completed).",
            "format": "int32"
          },
          "noReport": {
            "type": "integer",
            "description": "Clients with no report in scope.",
            "format": "int32"
          },
          "unscored": {
            "type": "integer",
            "description": "Clients whose report in scope has no health score (withReport = the scored clients + unscored).",
            "format": "int32"
          },
          "lowestHealth": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefPortfolioClientLineResource"
            },
            "description": "The 10 lowest health scores among the scored latest reports, lowest first.",
            "nullable": true
          },
          "mostUngraded": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefPortfolioClientLineResource"
            },
            "description": "The 10 highest ungraded-item counts, highest first; a report with nothing ungraded is not listed.",
            "nullable": true
          },
          "withoutReport": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Up to 25 names of the clients with no report in scope, alphabetical; noReport is the full count.",
            "nullable": true
          },
          "withoutReportTotal": {
            "type": "integer",
            "description": "How many clients have no report in scope, listed or not (equals noReport).",
            "format": "int32"
          },
          "withoutReportTruncated": {
            "type": "boolean",
            "description": "Whether withoutReport was cut at its 25 names."
          },
          "overdueByPrimaryUser": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleByUserLineResource"
            },
            "description": "Up to 5 vCIOs (primary users) with overdue report schedules this year, most overdue first (query_schedule's per-vCIO lines, \"(no primary user)\" for the schedules with none set); omitted, with a note, when you can see no report template.",
            "nullable": true
          },
          "weakestMfa": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefMfaLineResource"
            },
            "description": "Up to 5 clients with admins not registered for MFA, most such admins first (query_m365_users); omitted, with a note, when no client has synced Microsoft 365 users.",
            "nullable": true
          },
          "mostUngradedTechnology": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyCountLineResource"
            },
            "description": "Up to 5 clients with the most technology items on the Grade Needed grade (key = client name; query_technology); omitted, with a note, when your role cannot read technology or your organization has more than one Technology module.",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Why a list is omitted, when one is.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The portfolio triage over every client you can see, each read from its latest report, with the overdue vCIOs,\nthe weakest MFA and the most ungraded technology the module intent tools answer tenant-wide."
      },
      "BriefProposalResource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Proposal name as the PSA sends it.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "The PSA status name as last synced; shortened, ending in an ellipsis, only when the status and stage names of the listed proposals together exceed 1,000 characters; then the longest are shortened evenly.",
            "nullable": true
          },
          "stage": {
            "type": "string",
            "description": "The PSA stage name as last synced; omitted when the proposal has no stage. Shortened, ending in an ellipsis, only when the status and stage names of the listed proposals together exceed 1,000 characters; then the longest are shortened evenly.",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Amount as the PSA sends it; no currency is carried; omitted when not set.",
            "format": "double",
            "nullable": true
          },
          "expectedCloseDate": {
            "type": "string",
            "description": "Expected close date, yyyy-MM-dd; omitted when not set.",
            "nullable": true
          },
          "overdue": {
            "type": "boolean",
            "description": "Whether the expected close date has passed (UTC date) and the proposal is not closed, whatever its base status."
          }
        },
        "additionalProperties": false,
        "description": "A proposal of the client that is not closed, by names only."
      },
      "BriefProposalsResource": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "The client's proposals the Proposals module shows you.",
            "format": "int32"
          },
          "byBaseStatus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProposalCountLineResource"
            },
            "description": "The proposals by base status as query_proposals counts them: always Open, Accepted, Declined in that order, a zero line included, then \"(none)\" for the proposals of no known base status, when there are any; each line with its amount sum, a missing amount counted as 0. The Open line counts the proposals with no won or lost outcome, whether or not their status is a closed one; the proposals that are not closed are openAmount and open.",
            "nullable": true
          },
          "openAmount": {
            "type": "number",
            "description": "The sum of the amounts of the proposals that are not closed, whatever their base status, a missing amount counted as 0; no currency is carried.",
            "format": "double"
          },
          "open": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefProposalResource"
            },
            "description": "The proposals that are not closed, whatever their base status: overdue first, then the nearest expected close date, those without one last, up to 5; note says when more are. Ask query_proposals with open=true and detail=rows for the rest.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The client's proposals (PSA opportunities) as query_proposals counts them for the client: the Proposals module's own\naccess rule (Opportunities_IntegrationItems Read, the module on for you, the companies the module shows you). Omitted,\nwith a note, when your role cannot read proposals, the Proposals module is off for you, your organization has more\nthan one Proposals module, or the module does not show you the client. Amounts are summed as the PSA sends them: no\ncurrency is carried."
      },
      "BriefResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence asking which client is meant.",
            "nullable": true
          },
          "client": {
            "$ref": "#/components/schemas/BriefClientResource"
          },
          "portfolio": {
            "$ref": "#/components/schemas/BriefPortfolioResource"
          }
        },
        "additionalProperties": false,
        "description": "The answer of brief: exactly one of disambiguation, client and portfolio is returned."
      },
      "BriefResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BriefResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "BriefScheduleLineResource": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string",
            "description": "Report template name.",
            "nullable": true
          },
          "primaryUser": {
            "type": "string",
            "description": "The primary user's (vCIO's) full name; omitted when none is set.",
            "nullable": true
          },
          "reportsPerYear": {
            "type": "integer",
            "description": "The schedule's reports per year; 1 when the client has no schedule for the template and year.",
            "format": "int32"
          },
          "status": {
            "enum": [
              "overdue",
              "dueThisMonth",
              "onTrack",
              "done"
            ],
            "type": "string",
            "description": "overdue, dueThisMonth, onTrack or done."
          },
          "overdueCount": {
            "type": "integer",
            "description": "Target months passed (before the current month) minus months delivered so far, never below 0.",
            "format": "int32"
          },
          "nextDueMonth": {
            "type": "integer",
            "description": "The first target month (1-12) from the current month on with no delivered report; omitted when done or none is left.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One of the client's report schedules this year, as query_schedule rates it (its own rule, not the Schedule\nscreen's). query_schedule with the client name lists the target, completed and draft months."
      },
      "BriefTechnologyResource": {
        "type": "object",
        "properties": {
          "items": {
            "type": "integer",
            "description": "The client's technology items in every category.",
            "format": "int32"
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyCountLineResource"
            },
            "description": "The 5 largest categories (technology type, else group label), most items first; ask query_technology for the rest or for filters.",
            "nullable": true
          },
          "categoriesTotal": {
            "type": "integer",
            "description": "How many categories the client has before the cap of 5, e.g. 5 of 9 (query_technology lists at most 25).",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "The client's technology as query_technology counts it with groupBy=category: the Technology module's own access\nrule (FlexibleItems_Items Read and the module; inactive and unmapped items hidden, as listTechnologyItems hides\nthem). Omitted, with a note, when your role cannot read technology or the module does not show you the client."
      },
      "CompanyBulkPatchInput": {
        "required": [
          "entityIds"
        ],
        "type": "object",
        "properties": {
          "entityIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of the companies to patch. Required and non-empty; an empty list is never read as \"all companies\". At most 100 ids per request (configurable)."
          },
          "patch": {
            "type": "array",
            "items": {
              "required": [
                "op",
                "path"
              ],
              "type": "object",
              "properties": {
                "op": {
                  "type": "string",
                  "description": "Operation to perform: add, remove, replace, move, copy or test."
                },
                "path": {
                  "type": "string",
                  "description": "JSON Pointer to the target member, spelled exactly as THIS operation's own description documents its patchable paths — the casing differs per operation, so never carry a path from one operation to another."
                },
                "value": {
                  "description": "New value for add, replace and test. Any JSON type: string, number, boolean, array, object or null."
                },
                "from": {
                  "type": "string",
                  "description": "Source JSON Pointer. Required by move and copy, unused otherwise."
                }
              }
            },
            "description": "The RFC 6902 operation array to apply to every listed company. Patch paths are PascalCase (/Status, /Markets, /Types, /Groups, /PrimaryMarket, /FiscalYearStartMonthEnum, /StartDate, /EndDate)."
          }
        },
        "additionalProperties": false,
        "description": "Bulk patch request: apply ONE JSON Patch to many companies by explicit id. The wrapper is\napplication/json; External.API.Models.Companies.CompanyBulkPatchInput.Patch is the raw RFC 6902 operation array, bound as a JsonElement\nbecause System.Text.Json cannot materialize a JsonPatchDocument — the controller service converts it."
      },
      "CompanyBulkPatchItemError": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the company this failure belongs to — one of the entityIds sent in the request.",
            "format": "int32"
          },
          "code": {
            "enum": [
              "validationFailed",
              "notFound",
              "accessDenied",
              "internalError",
              "idempotencyKeyReused",
              "requestInProgress",
              "unauthenticated",
              "notImplemented",
              "rateLimited"
            ],
            "type": "string",
            "description": "Stable, documented error codes for the external API. Values are CONTRACT once shipped\n(rename = breaking change). New values are added as real cases appear; every addition must\nland in the External API Guide's error-code catalog in the same change."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation of why this company was not patched.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One per-company failure in a bulk patch: the company id, a machine-readable code (the shared\nExternalErrorCode, so it matches the single-resource error contract) and a human-readable message."
      },
      "CompanyBulkPatchResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyResource"
            },
            "description": "The companies that WERE patched, as full resources. A company that failed is absent here and appears in errors instead — never in both.",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyBulkPatchItemError"
            },
            "description": "One entry per company that was NOT patched, each with its id, code and message. Empty when every requested company updated.",
            "nullable": true
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id of this request; quote it in support requests to match the server logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Bulk patch result envelope: the companies that updated (External.API.Models.Companies.CompanyBulkPatchResponse.Items, full resources with\nid + name associations) and the per-company failures (External.API.Models.Companies.CompanyBulkPatchResponse.Errors) — true partial success.\nRequestId correlates with the logs, mirroring the single-resource responses."
      },
      "CompanyGroupInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Display name. Must be unique within the client."
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the group.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Make this the client's default group. The previous default is demoted automatically."
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Ids of the users to assign to this group. Non-admin creators are always assigned to the group they create. Admin users are not assignable (admins see every group).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Input for creating or updating a company group."
      },
      "CompanyGroupResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the company group. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the group. Unique within the client.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the group.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "True when this is the client's default group. The default group cannot be deleted or demoted directly.",
            "nullable": true
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Ids of the users assigned to this group.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A company group of the caller's client. Group visibility honors per-user assignment:\nnon-admin callers only see groups they belong to. Fields are omitted from the JSON when not\nselected via the fields/view parameters (only requested fields are returned; id is always\npresent)."
      },
      "CompanyGroupResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyGroupResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "CompanyGroupResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CompanyGroupResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "CompanyGroupsAddInput": {
        "required": [
          "groupIds"
        ],
        "type": "object",
        "properties": {
          "groupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of the groups to add. Required and non-empty. Every id must be one listCompanyGroups returns for your tenant; an unknown id is reported as not found and NOTHING is written. A group already on the company is accepted and left exactly as it is."
          }
        },
        "additionalProperties": false,
        "description": "The body addCompanyGroups takes: which groups to add to the company. Required and non-empty on\npurpose: every id is checked against the caller's tenant FIRST, so one unknown id is reported as\nnot found with nothing written rather than silently dropped."
      },
      "CompanyInput": {
        "required": [
          "companyStatusId",
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Company name. Must be unique within the client. Max 50 characters."
          },
          "companyStatusId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Company status lookup id. Must belong to the caller's client.",
            "format": "int32"
          },
          "groupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Group (territory) ids to assign. At least one is required for non-admin callers.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Optional description. Max 2048 characters.",
            "nullable": true
          },
          "typeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Optional company type lookup ids to assign.",
            "nullable": true
          },
          "marketIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Optional market lookup ids to assign.",
            "nullable": true
          },
          "primaryMarketId": {
            "type": "integer",
            "description": "Optional primary market id. Must be one of MarketIds.",
            "format": "int32",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "description": "Optional start date (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "description": "Optional end date (UTC). Requires a start date.",
            "format": "date-time",
            "nullable": true
          },
          "websiteUrl": {
            "type": "string",
            "description": "Optional website URL. Max 256 characters.",
            "nullable": true
          },
          "fiscalYearStartMonth": {
            "enum": [
              "january",
              "february",
              "march",
              "april",
              "may",
              "june",
              "july",
              "august",
              "september",
              "october",
              "november",
              "december"
            ],
            "type": "string",
            "description": "Optional per-company fiscal year start month. Null inherits the account default.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean input for creating a company. Required: name, status and (for non-admin callers) at least\none group. User assignment is not part of the external create surface. The primary site is\ndefaulted server-side."
      },
      "CompanyMarketInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Display name. Must be unique within the client."
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the market.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Input for creating or updating a company market."
      },
      "CompanyMarketRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the market (see listCompanyMarkets).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the market.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the market.",
            "nullable": true
          },
          "isPrimary": {
            "type": "boolean",
            "description": "True when this is the company's primary market."
          }
        },
        "additionalProperties": false,
        "description": "A market associated with a company. Carries the market id so a consumer can round-trip to\nlistCompanyMarkets, plus the primary-market flag that is otherwise only known internally.\nDistinct from the companyMarkets lookup resource (this one adds the per-company primary flag)."
      },
      "CompanyMarketResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the company market. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the market. Unique within the client.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the market.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A company market of the caller's client. Fields are omitted from the JSON when not selected\nvia the fields/view parameters (only requested fields are returned; id is always present)."
      },
      "CompanyMarketResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyMarketResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "CompanyMarketResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CompanyMarketResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "CompanyMarketsAddInput": {
        "required": [
          "marketIds"
        ],
        "type": "object",
        "properties": {
          "marketIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of the markets to add. Required and non-empty. Every id must be one listCompanyMarkets returns for your tenant; an unknown id is reported as not found and NOTHING is written. A market already on the company is accepted and left exactly as it is. None of them becomes primary; use updateCompanyPrimaryMarket for that."
          }
        },
        "additionalProperties": false,
        "description": "The body addCompanyMarkets takes: which markets to add to the company. Same whole-request rule as\naddCompanyGroups: one unknown id fails the request with nothing written."
      },
      "CompanyPrimaryMarketInput": {
        "required": [
          "marketId"
        ],
        "type": "object",
        "properties": {
          "marketId": {
            "type": "integer",
            "description": "Id of the market to make primary. It must already be one of the company's markets (see getCompany or add it with addCompanyMarkets first); any other id is refused and nothing changes.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "The body updateCompanyPrimaryMarket takes: which of the company's markets becomes primary."
      },
      "CompanyResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the company. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the company.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the company.",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/CompanyStatusRef"
          },
          "startDate": {
            "type": "string",
            "description": "Date the company relationship started (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "description": "Date the company relationship ended (UTC), if any.",
            "format": "date-time",
            "nullable": true
          },
          "websiteUrl": {
            "type": "string",
            "description": "Company website URL.",
            "nullable": true
          },
          "fiscalYearStartMonth": {
            "enum": [
              "january",
              "february",
              "march",
              "april",
              "may",
              "june",
              "july",
              "august",
              "september",
              "october",
              "november",
              "december"
            ],
            "type": "string",
            "description": "First month of the company's fiscal year. When null the account default applies.",
            "nullable": true
          },
          "markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyMarketRef"
            },
            "description": "Markets associated with the company (id + name + description, and which is primary; see listCompanyMarkets).",
            "nullable": true
          },
          "types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelatedEntityResource"
            },
            "description": "Types associated with the company (id + name; see listCompanyTypes).",
            "nullable": true
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelatedEntityResource"
            },
            "description": "Groups associated with the company (id + name; see listCompanyGroups).",
            "nullable": true
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyUserRef"
            },
            "description": "Users assigned to the company (string GUID id + name; see getUser). Only present in the Full view.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A company visible to the caller (tenant scope + the caller's group/direct assignment rules).\nFields are omitted from the JSON when not selected via the fields/view parameters (only\nrequested fields are returned; id is always present)."
      },
      "CompanyResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "CompanyResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CompanyResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "CompanyStatusInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Display name. Must be unique within the client."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Make this the client's default status. Demoting the current default requires another default to exist."
          },
          "isHideCompanies": {
            "type": "boolean",
            "description": "Hide companies with this status from company lists."
          }
        },
        "additionalProperties": false,
        "description": "Input for creating or updating a company status."
      },
      "CompanyStatusRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the status (see listCompanyStatuses).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the status.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the client's default status. Only present in the Full view.",
            "nullable": true
          },
          "isHideCompanies": {
            "type": "boolean",
            "description": "Whether companies with this status are hidden. Only present in the Full view.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The status of a company. Carries id + name in every view; the extra flags are populated only\nin the Full view (view=Full) so default responses stay lean — see the general related-entity\nrule in the guide. Filter companies by status with the companyStatusId query parameter."
      },
      "CompanyStatusResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the company status. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the status. Unique within the client.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "True when this is the client's default status for new companies. Exactly one status is default.",
            "nullable": true
          },
          "isHideCompanies": {
            "type": "boolean",
            "description": "True when companies with this status are hidden from company lists.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A company status of the caller's client. Fields are omitted from the JSON when not selected\nvia the fields/view parameters (only requested fields are returned; id is always present)."
      },
      "CompanyStatusResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyStatusResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "CompanyStatusResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CompanyStatusResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "CompanyTypeInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Display name. Must be unique within the client."
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the type.",
            "nullable": true
          },
          "isProspect": {
            "type": "boolean",
            "description": "Mark companies of this type as prospects (not yet customers)."
          }
        },
        "additionalProperties": false,
        "description": "Input for creating or updating a company type."
      },
      "CompanyTypeResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the company type. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the type. Unique within the client.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the type.",
            "nullable": true
          },
          "isProspect": {
            "type": "boolean",
            "description": "True when companies of this type are prospects (not yet customers).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A company type of the caller's client. Fields are omitted from the JSON when not selected\nvia the fields/view parameters (only requested fields are returned; id is always present)."
      },
      "CompanyTypeResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyTypeResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "CompanyTypeResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CompanyTypeResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "CompanyUserRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the user. A string GUID (see getUser).",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Full name of the user.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A user assigned to the company. The id is a string GUID — users do not follow the int-id\nconvention the company's other related entities use."
      },
      "CreateAssessmentDraftInput": {
        "required": [
          "client",
          "template"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name, exact (case aside); a partial name or several matching clients return disambiguation candidates and create nothing."
          },
          "template": {
            "minLength": 1,
            "type": "string",
            "description": "Report template name, e.g. \"Quarterly Business Review\": the draft is created from that template. Same name rules as client."
          },
          "carryForward": {
            "type": "boolean",
            "description": "When true (the default) the new draft copies the client's latest report of the template forward, content and filters, as the application's New button does. When false it is built blank from the template.",
            "default": true
          }
        },
        "additionalProperties": false,
        "description": "Body of create_assessment_draft: the client and the report template a draft report is created for, by name."
      },
      "CreateAssessmentDraftResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation, or when created is false: the sentence saying what happened and what to do next.",
            "nullable": true
          },
          "created": {
            "type": "boolean",
            "description": "True when a new draft was created; false when the client already has an open draft of the template, which is left as it is and nothing was created.",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "carriedForwardFrom": {
            "type": "string",
            "description": "The report date of the report the new draft was copied from; omitted when nothing was carried forward.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of create_assessment_draft: either disambiguation (nothing was created), a refusal because the client\nalready has an open draft of the template (created false, nothing was created), or the new draft (created true)."
      },
      "CreateAssessmentDraftResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CreateAssessmentDraftResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "CreateGoalInput": {
        "required": [
          "client",
          "name"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name, exact (case aside); a partial name or several matching clients return disambiguation candidates and create nothing."
          },
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Name of the new goal, max 255 characters. A name the client already has on a goal (case aside) is refused and nothing is created: change that goal with update_goal, or pick another name."
          },
          "template": {
            "type": "string",
            "description": "A goal template name from your library (see listGoalTemplates), exact (case aside): its description, icon and colour are copied unless given. Needs Goals_Templates Read; an unknown name returns the nearest template names.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Plain-text description, max 1000 characters; left out with a template, the template's description is used.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label: Planned, On track, At risk or Done; same name rules as client. Omit, or send \"\", for no status; a label of spaces is refused. An unknown label is notFound listing every status.",
            "nullable": true
          },
          "progress": {
            "type": "integer",
            "description": "Progress in percent, 0-100; omitted means 0. Stored as sent: it does not move the status.",
            "format": "int32",
            "nullable": true
          },
          "isTrackProgress": {
            "type": "boolean",
            "description": "Whether the goal's progress is tracked, true or false; omitted means true.",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "description": "Start date, yyyy-MM-dd (an ISO date-time is accepted; the calendar day is kept as written); the target date may not be before it.",
            "nullable": true
          },
          "targetDate": {
            "type": "string",
            "description": "Target date, yyyy-MM-dd (an ISO date-time is accepted; the calendar day is kept as written); it may not be before the start date.",
            "nullable": true
          },
          "owner": {
            "type": "string",
            "description": "The owner's full name, first and last, among the active users who may own a goal of the client (access to its company); same name rules as client. Omit, or send \"\", for no owner; a name of spaces is refused.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of create_goal: the client to create one goal for, by name, the goal's name and the fields to start it with. A\nmember left out takes createGoal's default (no status, progress 0, tracked, no dates, no owner)."
      },
      "CreateGoalResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next.",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "goal": {
            "$ref": "#/components/schemas/GoalRowResource"
          }
        },
        "additionalProperties": false,
        "description": "The answer of create_goal: either disambiguation (nothing was created) or the scope and the goal as it reads after\nthe create."
      },
      "CreateGoalResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CreateGoalResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "CreateInitiativeFromFindingInput": {
        "required": [
          "client",
          "item"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and creates nothing."
          },
          "item": {
            "minLength": 1,
            "type": "string",
            "description": "Assessment item name on the client's report, e.g. \"Backup\" (the finding). An exact name wins; a term of 5 characters or fewer matches whole words only; several matches return disambiguation candidates and create nothing."
          },
          "template": {
            "type": "string",
            "description": "Report template name: the finding is read from that template's reports only. Same name rules as client.",
            "nullable": true
          },
          "group": {
            "type": "string",
            "description": "Assessment group name: picks the copy of item in that group when the item name sits on the report more than once (without it such an item answers disambiguation candidates on group and creates nothing). Same name rules as client.",
            "nullable": true
          },
          "report": {
            "enum": [
              "latest",
              "latestDraft",
              "latestCompleted"
            ],
            "type": "string",
            "description": "Which report of the client the finding is read from: latest (default) = the newest report; latestDraft = the newest draft; latestCompleted = the newest completed report. Archived reports are never read. The finding is linked to a new initiative item only when its report is a draft (latestDraft reads one)."
          },
          "target": {
            "enum": [
              "initiative",
              "plan"
            ],
            "type": "string",
            "description": "initiative = an initiative item (the default); plan = an item of one of the client's standalone plans. Leave it out and give plan or part for a plan item; initiative together with plan or part is refused.",
            "nullable": true
          },
          "plan": {
            "type": "string",
            "description": "Plan name, for a plan item; needed when the client has several plans you can open (without it they are returned as candidates and nothing is created). Same name rules as client.",
            "nullable": true
          },
          "part": {
            "type": "string",
            "description": "Part label of the plan, for a plan item; needed when the plan has several parts (without it they are returned as candidates and nothing is created). Same name rules as client.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name of the new item; omit to take the finding's name.",
            "nullable": true
          },
          "budgetLine": {
            "enum": [
              "items",
              "labor",
              "parts"
            ],
            "type": "string",
            "description": "Initiative item only: the line of the new item's one-time budget that takes the finding's one-time budget - items, labor or parts (the item's oneTimeBudget is the sum of the three lines). Leave it out and the budget is not copied (note says so); given while the finding has no one-time budget, it is ignored (note). A plan item takes the budget in its OneTimeBudget column, so given with a plan target it is ignored (note).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of create_initiative_from_finding: which assessment finding of which client to turn into planned work, by name,\nand where to put it. The finding is read like query_assessment reads one item and is never changed."
      },
      "CreateInitiativeFromFindingResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next. Otherwise, when set: which value of the finding was not copied and why, and why the finding was not linked (always for a plan item, which has no finding link).",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "finding": {
            "$ref": "#/components/schemas/AiSingleItemResource"
          },
          "initiative": {
            "$ref": "#/components/schemas/InitiativeRowResource"
          },
          "planItem": {
            "$ref": "#/components/schemas/PlanItemRowResource"
          },
          "description": {
            "type": "string",
            "description": "target plan: the created item's description (the finding's solution).",
            "nullable": true
          },
          "linked": {
            "type": "boolean",
            "description": "target initiative: true when the finding was linked to the new item; false with the reason in note. Omitted for target plan: a plan item has no finding link, and note says so.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of create_initiative_from_finding: either disambiguation (nothing was created) or the scope, the finding\nas it was read, the created row as it reads after the create and, for an initiative item, whether the finding was\nlinked to it."
      },
      "CreateInitiativeFromFindingResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CreateInitiativeFromFindingResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "CreatePlanItemInput": {
        "required": [
          "client",
          "name"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and writes nothing."
          },
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "The new item's name, written to the part's Name column."
          },
          "plan": {
            "type": "string",
            "description": "Plan name; needed when the client has several plans you can open (without it they are returned as candidates and nothing is written). Same name rules as client.",
            "nullable": true
          },
          "part": {
            "type": "string",
            "description": "Part label; needed when the plan has several parts (without it the parts are returned as candidates and nothing is written). Same name rules as client.",
            "nullable": true
          },
          "parentId": {
            "type": "integer",
            "description": "Id of the row to create the item under, from a query_plans row of a plan of the named client; that row decides the plan and the part, so plan and part are then not used. Omit it or pass 0 to create it at the top level; the item lands last.",
            "format": "int32",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label of the item's part to set, e.g. \"In Progress\" (each part has its own status list); same name rules as client. An unknown label is notFound listing the part's statuses.",
            "nullable": true
          },
          "month": {
            "type": "integer",
            "description": "The Month column to set, 1-12; any other value is refused.",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "The Year column to set, a calendar year from 1900 to 2200, e.g. 2027; any other value is refused.",
            "format": "int32",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "number",
            "description": "The One-time budget column to set.",
            "format": "double",
            "nullable": true
          },
          "assignee": {
            "type": "string",
            "description": "The full name, first and last, of the user for the part's User column, among the active users with access to the plan's client; same name rules as client. An empty string leaves the column empty.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description text of the new item; an empty string leaves it without one.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of create_plan_item: the client to create a plan item for, by name, the new item's name, where it goes (plan and\npart by name, or the row to nest it under by id) and the fields to start it with. A member left out is not written."
      },
      "CreatePlanItemResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next.",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "item": {
            "$ref": "#/components/schemas/PlanItemRowResource"
          },
          "description": {
            "type": "string",
            "description": "The created item's description.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of create_plan_item: either disambiguation (nothing was created) or the scope and the created item as it\nreads after the create."
      },
      "CreatePlanItemResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CreatePlanItemResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "DeletedPlanResource": {
        "type": "object",
        "properties": {
          "plan": {
            "$ref": "#/components/schemas/PlanResource"
          },
          "deletedAt": {
            "type": "string",
            "description": "When the plan was moved to the trash (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "deletedBy": {
            "$ref": "#/components/schemas/PlanDeletedByRef"
          }
        },
        "additionalProperties": false,
        "description": "One plan in the internal trash: the plan itself in the same Summary shape listPlans publishes, plus\nwho deleted it and when. The plan is not readable through getPlan while it sits here — restorePlan\nbrings it back first."
      },
      "DeletedPlanResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeletedPlanResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "ExternalError": {
        "required": [
          "code",
          "message"
        ],
        "type": "object",
        "properties": {
          "code": {
            "enum": [
              "validationFailed",
              "notFound",
              "accessDenied",
              "internalError",
              "idempotencyKeyReused",
              "requestInProgress",
              "unauthenticated",
              "notImplemented",
              "rateLimited"
            ],
            "type": "string",
            "description": "Stable machine-readable error code (documented contract; see the External API Guide)."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation of the failure.",
            "nullable": true
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalError"
            },
            "description": "Optional nested errors (e.g. one per invalid field).",
            "nullable": true
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Error body returned by all external endpoints on failure. The HTTP status carries the\noutcome class; Code is the stable machine-readable reason (see ExternalErrorCode)."
      },
      "GoalCountLineResource": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The status label, the quarter of the target date (\"2026-Q1\", or \"unscheduled\" for no target date) or the client name; \"(none)\" is the status line of the goals with no status.",
            "nullable": true
          },
          "count": {
            "type": "integer",
            "description": "Matching goals in the group.",
            "format": "int32"
          },
          "averageProgress": {
            "type": "integer",
            "description": "Rounded mean progress of the goals in the line whose progress is tracked; omitted when none is.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One group of the matched goals: a status, a calendar quarter of the target date or a client."
      },
      "GoalCreateResource": {
        "required": [
          "companiesIds"
        ],
        "type": "object",
        "properties": {
          "companiesIds": {
            "maxItems": 100,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Companies to create the goal for, one goal each, in the order the response echoes them (see listCompanies). Required, 1-100 distinct ids, each a company you can see: an unknown, foreign or not granted company, a company whose status hides companies, or a repeated id fails the whole request with nothing created."
          },
          "name": {
            "type": "string",
            "description": "Display name of every goal created. Max 255 characters; may not be blank unless templateId is sent, in which case a blank or missing name takes the template's name.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Plain-text description. Max 1000 characters. When null and templateId is sent, the template's description is used.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the goal's mark, free-form text. Max 100 characters. When null and templateId is sent, the template's icon is used.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the goal's mark, free-form text. Max 50 characters. When null and templateId is sent, the template's colour is used.",
            "nullable": true
          },
          "statusId": {
            "type": "string",
            "description": "Status option id, a string GUID: 00000000-0000-0000-0000-000000000301 Planned, 00000000-0000-0000-0000-000000000302 On track, 00000000-0000-0000-0000-000000000303 At risk, 00000000-0000-0000-0000-000000000304 Done. Null or omitted means no status.",
            "nullable": true
          },
          "progress": {
            "type": "integer",
            "description": "Progress in percent, 0-100. Omitted means 0. Stored as sent: it does not move the status.",
            "format": "int32",
            "nullable": true
          },
          "isTrackProgress": {
            "type": "boolean",
            "description": "Whether the goal's progress is tracked, true or false. Omitted means true.",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "description": "Start date, a calendar date sent at 00:00 (for example \"2026-10-01T00:00:00\"). The target date may not be before the start date.",
            "format": "date-time",
            "nullable": true
          },
          "targetDate": {
            "type": "string",
            "description": "Target date, a calendar date sent at 00:00 (for example \"2027-03-31T00:00:00\"). The target date may not be before the start date.",
            "format": "date-time",
            "nullable": true
          },
          "ownerId": {
            "type": "string",
            "description": "Owner of every goal created (a user string GUID, see listUsers): a user with access to each company in companiesIds.",
            "nullable": true
          },
          "templateId": {
            "type": "integer",
            "description": "Goal template to create from (see listGoalTemplates). A template of another client, or an id that matches nothing, is notFound and nothing is created. Needs Goals_Templates Read.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of createGoal: one goal per company, all or nothing, each appended at the end of its company's\nmanual order. The optional fields are validated and stored as patchGoal stores them. With templateId\n(see listGoalTemplates) a blank name and a null description, icon or colour come from the template, and\nthe goal records the template; a value sent in the body wins, \"\" included."
      },
      "GoalInitiativesLinkInput": {
        "required": [
          "initiativeItemIds"
        ],
        "type": "object",
        "properties": {
          "initiativeItemIds": {
            "maxItems": 100,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Initiative item ids, the id of listInitiativeItems. Required, 1-100 positive ids; a repeated id counts once. An empty, longer or non-positive list fails the whole request with nothing written."
          }
        },
        "additionalProperties": false,
        "description": "Body of linkGoalInitiatives and unlinkGoalInitiatives: the initiative items to link to, or unlink from, one goal.\nIds are handled independently: each one that cannot be written is reported in the response's errors."
      },
      "GoalLinkPlanItemInput": {
        "required": [
          "item",
          "plan"
        ],
        "type": "object",
        "properties": {
          "plan": {
            "minLength": 1,
            "type": "string",
            "description": "The plan's name, exact (case aside)."
          },
          "item": {
            "minLength": 1,
            "type": "string",
            "description": "The row's name inside that plan's first part, exact (case aside); several rows of the name in the plan return candidates with their part and parent row."
          }
        },
        "additionalProperties": false,
        "description": "One plan row of link_goal and unlink_goal, by name: the plan, then the row inside that plan's first part. A row name\nrecurs across a client's plans (plans are copied year to year), so the plan says which one is meant."
      },
      "GoalLinkedInitiativeResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the initiative item (see listInitiativeItems / getInitiativeItem).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the initiative item. Absent when the Initiatives Name column is internal and hidden from your role.",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/GoalLinkedStatusRef"
          },
          "month": {
            "type": "integer",
            "description": "Budget month of the initiative item (1-12), or null.",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Budget year of the initiative item, or null.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An initiative item linked to a goal, as the goal's relationships block shows it. When the Initiatives Name or\nStatus column is internal and your role may not read internal columns, that field is absent."
      },
      "GoalLinkedPlanItemResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the plan item (see listPlanItems).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "The plan item's value in its part's Name column.",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/GoalLinkedStatusRef"
          },
          "plan": {
            "$ref": "#/components/schemas/GoalRelatedRef"
          },
          "part": {
            "$ref": "#/components/schemas/GoalRelatedRef"
          }
        },
        "additionalProperties": false,
        "description": "A plan item linked to a goal directly, with the plan and the plan part it belongs to."
      },
      "GoalLinkedPlanResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the plan (see listPlans / getPlan).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the plan.",
            "nullable": true
          },
          "statusEnum": {
            "enum": [
              "undefined",
              "active",
              "completed"
            ],
            "type": "string",
            "description": "Lifecycle status of the plan: active or completed (undefined on a legacy row)."
          },
          "isCompleted": {
            "type": "boolean",
            "description": "Whether the plan counts as completed for the goal."
          }
        },
        "additionalProperties": false,
        "description": "A whole plan linked to a goal; its items are not expanded in the goal's relationships block."
      },
      "GoalLinkedStatusRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the status option, as the linked row's Status column stores it.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Label of the status option.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The status of a row linked to a goal: an option of that row's own Status column (the initiative's or the plan\npart's), not a goal status."
      },
      "GoalOwnerRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the owner. A string GUID (see listUsers), or null when the user account was deleted.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the owner (first and last), falling back to the stored name of a deleted user.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The user who owns a goal. The id is a string GUID (see listUsers). When the user account has been\ndeleted the id is null and the name still carries the snapshot the delete flow wrote, so the goal keeps\nreading as owned by a person rather than by nobody."
      },
      "GoalPlanItemsLinkInput": {
        "required": [
          "planItemIds"
        ],
        "type": "object",
        "properties": {
          "planItemIds": {
            "maxItems": 100,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Plan item ids, the id of listPlanItems on a plan's first part (listPlanParts), Item or Group rows. Required, 1-100 positive ids; a repeated id counts once. An empty, longer or non-positive list fails the whole request with nothing written."
          }
        },
        "additionalProperties": false,
        "description": "Body of linkGoalPlanItems and unlinkGoalPlanItems: the plan items to link to, or unlink from, one goal directly. Ids\nare handled independently: each one that cannot be written is reported in the response's errors."
      },
      "GoalPlansLinkInput": {
        "required": [
          "planIds"
        ],
        "type": "object",
        "properties": {
          "planIds": {
            "maxItems": 100,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Plan ids, the id of listPlans. Required, 1-100 positive ids; a repeated id counts once. An empty, longer or non-positive list fails the whole request with nothing written."
          }
        },
        "additionalProperties": false,
        "description": "Body of linkGoalPlans and unlinkGoalPlans: the whole plans to link to, or unlink from, one goal. Ids are handled\nindependently: each one that cannot be written is reported in the response's errors."
      },
      "GoalRelatedRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the related entity.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the related entity.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A related entity of a goal that is keyed by an integer id: the company the goal belongs to and the\ntemplate it was created from. Carries id + name in every view, per the shared related-entity rule."
      },
      "GoalRelationshipsLinkResponse": {
        "type": "object",
        "properties": {
          "relationships": {
            "$ref": "#/components/schemas/GoalRelationshipsResource"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelationshipLinkItemError"
            },
            "description": "The ids that were not linked (or not unlinked), one entry each with a code and a message naming the records. Empty when every id was written; on a link, a pair that was already linked is not an error.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Result of the goal link and unlink operations, the data of the { data, requestId } envelope: the goal's\nrelationships after the write and one error per id that was not written, a true partial success. The body is\nvalidated FIRST, so a malformed one is a 400 that writes nothing; once it is valid this arrives with 200 even when\nevery id failed."
      },
      "GoalRelationshipsLinkResponseExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GoalRelationshipsLinkResponse"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "GoalRelationshipsResource": {
        "type": "object",
        "properties": {
          "initiatives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalLinkedInitiativeResource"
            },
            "description": "Initiative items linked to the goal (see listInitiativeItems). Empty when none you can see is linked.",
            "nullable": true
          },
          "plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalLinkedPlanResource"
            },
            "description": "Whole plans linked to the goal (see listPlans); their items are not expanded here. Empty when none you can see is linked.",
            "nullable": true
          },
          "planItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalLinkedPlanItemResource"
            },
            "description": "Plan items linked to the goal directly, each with its plan and plan part. Empty when none you can see is linked.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The goal's relationships, read-only: the initiatives, whole plans and plan items linked to the goal whose other\nend you can see. On getGoal and listGoals in the Full view (or with fields=Relationships), and on the link\nresponses; links are added with linkGoalInitiatives, linkGoalPlans and linkGoalPlanItems and removed with their\nunlink twins. The arrays are never null: an empty array means nothing you can see is linked."
      },
      "GoalResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the goal. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the goal.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Plain-text description of the goal. Only present in the Full view.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the goal's mark: free-form text, as stored (no format is enforced); absent when the default mark is used. Only present in the Full view.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the goal's mark: free-form text, as stored (no format is enforced); absent when the default mark is used. Only present in the Full view.",
            "nullable": true
          },
          "company": {
            "$ref": "#/components/schemas/GoalRelatedRef"
          },
          "status": {
            "$ref": "#/components/schemas/GoalStatusRef"
          },
          "progress": {
            "type": "integer",
            "description": "Progress of the goal in percent (0-100), stored as sent: it is not derived from the status, so a Done goal can read less than 100.",
            "format": "int32",
            "nullable": true
          },
          "isTrackProgress": {
            "type": "boolean",
            "description": "Whether the goal's progress is tracked (default true). Stored as sent and independent of progress: false does not change it, and progress stays writable.",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "description": "Start date of the goal: a calendar date, sent and returned at 00:00 with no time-zone conversion. Absent when not set.",
            "format": "date-time",
            "nullable": true
          },
          "targetDate": {
            "type": "string",
            "description": "Target date of the goal: a calendar date, sent and returned at 00:00 with no time-zone conversion. Absent when not set.",
            "format": "date-time",
            "nullable": true
          },
          "owner": {
            "$ref": "#/components/schemas/GoalOwnerRef"
          },
          "template": {
            "$ref": "#/components/schemas/GoalRelatedRef"
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the goal inside its company's manual order. Read-only here; move a goal with updateGoalSortOrder. Only present in the Full view.",
            "format": "double",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "When the goal was created (UTC). Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "description": "When the goal was last updated (UTC); absent on a goal never edited since creation. Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "relationships": {
            "$ref": "#/components/schemas/GoalRelationshipsResource"
          }
        },
        "additionalProperties": false,
        "description": "One goal of the caller's client, in a company the caller can see. Fields are omitted from the JSON when\nthey are not selected through the fields / view parameters, and a selected field is omitted when its\nvalue is null (id is always present). Relationships are read-only output on reads; the template is set on\ncreateGoal only."
      },
      "GoalResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "GoalResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GoalResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "GoalRowResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Goal name.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label (Planned, On track, At risk or Done); omitted when the goal has none.",
            "nullable": true
          },
          "progress": {
            "type": "integer",
            "description": "Progress in percent, 0-100, as stored: it does not follow the status.",
            "format": "int32"
          },
          "isTrackProgress": {
            "type": "boolean",
            "description": "Whether the goal's progress is tracked; an untracked goal adds nothing to averageProgress."
          },
          "startDate": {
            "type": "string",
            "description": "Start date, yyyy-MM-dd; omitted when not set.",
            "nullable": true
          },
          "targetDate": {
            "type": "string",
            "description": "Target date, yyyy-MM-dd; omitted when not set.",
            "nullable": true
          },
          "owner": {
            "type": "string",
            "description": "The owner's full name (a deleted user's name as it was); omitted when the goal has no owner.",
            "nullable": true
          },
          "template": {
            "type": "string",
            "description": "The goal template the goal was created from or last had applied; omitted when none.",
            "nullable": true
          },
          "linkedInitiatives": {
            "type": "integer",
            "description": "Initiative items linked to the goal that you can see, as getGoal's relationships lists them.",
            "format": "int32"
          },
          "linkedPlans": {
            "type": "integer",
            "description": "Whole plans linked to the goal that you can see, as getGoal's relationships lists them.",
            "format": "int32"
          },
          "linkedPlanItems": {
            "type": "integer",
            "description": "Plan items linked to the goal directly that you can see, as getGoal's relationships lists them.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "One goal, by names only, with how many initiatives, plans and plan items its relationships show you."
      },
      "GoalSortOrderInput": {
        "type": "object",
        "properties": {
          "afterGoalId": {
            "type": "integer",
            "description": "Id of the goal the moved goal lands directly after. null, 0 or an omitted property all mean the FIRST position. An anchor you cannot see answers notFound, exactly as reading it would. Anchoring a goal on itself is a no-op that returns the goal unchanged. The anchor must be a goal of the SAME company: a goal of another company you can see is validationFailed.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of `updateGoalSortOrder`: the goal the moved goal lands AFTER. Insert-after rather than an\nabsolute index, so a concurrent write elsewhere in the sequence cannot silently move the goal somewhere\nthe caller did not ask for — the same contract the module's internal drag-and-drop takes\n(`GoalOrderUpdateModel.ItemIdAfterSort`)."
      },
      "GoalStatusRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the status option, a string GUID. The four options are fixed for every client: 00000000-0000-0000-0000-000000000301 Planned, 00000000-0000-0000-0000-000000000302 On track, 00000000-0000-0000-0000-000000000303 At risk, 00000000-0000-0000-0000-000000000304 Done.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Label of the status option, resolved from the client's Goal Status option list.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The status of a goal, resolved against the client's Goal Status option list. The id is a string GUID\nthat identifies one option inside that list; it is not a row id and there is no status table. The same\nvalue is what the statusId filter and the /statusId patch path take. A goal with no status carries no\nstatus object at all."
      },
      "GoalTemplateCreateResource": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "Display name of the template. Required, max 255 characters, trimmed. A name another template of your client holds, compared case-insensitively, is validationFailed and nothing is created."
          },
          "description": {
            "maxLength": 1000,
            "type": "string",
            "description": "Plain-text description a goal created from the template starts with. Max 1000 characters.",
            "nullable": true
          },
          "icon": {
            "maxLength": 100,
            "type": "string",
            "description": "Icon of the mark a goal created from the template starts with, free-form text. Max 100 characters.",
            "nullable": true
          },
          "color": {
            "maxLength": 50,
            "type": "string",
            "description": "Colour of the mark a goal created from the template starts with, free-form text. Max 50 characters.",
            "nullable": true
          },
          "groupId": {
            "type": "integer",
            "description": "Template group to create the template in: a group id off a template's group in listGoalTemplates. Null, 0 or omitted creates an ungrouped template. A group of another client, or an id that matches no group, is notFound and nothing is created.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of createGoalTemplate: one template of the caller's client's goal template library, appended at the end\nof its group, or of the ungrouped templates when no group is named. The name is trimmed and unique within the\nclient, compared case-insensitively. The position is decided by the server: there is no sortOrder member."
      },
      "GoalTemplateResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the goal template: the templateId createGoal and the listGoals templateId filter take. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the template; a goal created from it without a name takes this one.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Plain-text description a goal created from the template starts with, unless the create sends its own.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the mark a goal created from the template starts with: free-form text, as stored; absent when the template has none.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the mark a goal created from the template starts with: free-form text, as stored; absent when the template has none.",
            "nullable": true
          },
          "group": {
            "$ref": "#/components/schemas/GoalRelatedRef"
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the template inside its group, or inside the ungrouped templates. Read-only.",
            "format": "double",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "When the template was created (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "description": "When the template was last updated (UTC); absent on a template never edited since creation.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One template of the caller's client's goal template library: the name, description, icon and colour a\ngoal created from it starts with. Templates are created and edited here (createGoalTemplate,\npatchGoalTemplate), which answer this shape too; they are reordered and applied to existing goals in the\napplication only. Fields are omitted from the JSON when their value is null."
      },
      "GoalTemplateResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalTemplateResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "GoalTemplateResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GoalTemplateResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "GradeAssessmentItemInput": {
        "required": [
          "client",
          "item"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name, exact (case aside); a partial name or several matching clients return disambiguation candidates and write nothing."
          },
          "item": {
            "minLength": 1,
            "type": "string",
            "description": "Assessment item name on the client's draft report, exact (case aside), e.g. \"Backup\". A partial name or several matching items return disambiguation candidates and write nothing."
          },
          "grade": {
            "type": "string",
            "description": "Grade name, e.g. \"Healthy\": one of the grades of the draft report's template; omit it, or send it empty or blank, to leave the grade unchanged.",
            "nullable": true
          },
          "template": {
            "type": "string",
            "description": "Report template name, e.g. \"Quarterly Business Review\": write that template's draft. Needed when the client has an open draft of more than one template: without it the answer lists the drafts as disambiguation candidates and writes nothing. Same name rules as client.",
            "nullable": true
          },
          "group": {
            "type": "string",
            "description": "Assessment group name on the draft, e.g. \"Backup\": writes the copy of item in that group when the item name sits on the draft more than once (without it such an item answers disambiguation candidates on group and writes nothing). Same name rules as client; no match = 404 with the nearest group names.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status text to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "risk": {
            "type": "string",
            "description": "Risk text to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "solution": {
            "type": "string",
            "description": "Solution text to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "string",
            "description": "One-time budget to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "recurringBudget": {
            "type": "string",
            "description": "Recurring budget to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of grade_assessment_item: which item of which client's current draft report to update, by name, and the grade\nand texts to write, at least one of them. A member left out is left as it is on the item."
      },
      "GradeAssessmentItemResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next.",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "item": {
            "$ref": "#/components/schemas/AiSingleItemResource"
          }
        },
        "additionalProperties": false,
        "description": "The answer of grade_assessment_item: either disambiguation (nothing was written) or the scope and the item\nas it reads after the write."
      },
      "GradeAssessmentItemResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GradeAssessmentItemResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "GroupTemplateExecutiveSummaryUpdateInput": {
        "required": [
          "executiveSummary"
        ],
        "type": "object",
        "properties": {
          "executiveSummary": {
            "type": "string",
            "description": "Executive summary HTML. An empty string clears the summary. Images are managed internally and cannot be attached through this API."
          }
        },
        "additionalProperties": false,
        "description": "Body of patchGroupTemplateExecutiveSummary: the whole executive summary of one assessment-template part,\nreplaced outright. The member is required — an absent body is not \"leave it as it is\", it is a bad request;\nsend an empty string to clear the summary."
      },
      "GroupTemplateGradeInput": {
        "required": [
          "columnId",
          "name"
        ],
        "type": "object",
        "properties": {
          "columnId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Identifier of the grade column to create the grade on. Must belong to the template in the route.",
            "format": "int32"
          },
          "name": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Display name of the grade. Must be unique within the column and at most 50 characters."
          },
          "icon": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Icon of the grade. At most 50 characters.",
            "nullable": true
          },
          "color": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Colour of the grade. At most 50 characters.",
            "nullable": true
          },
          "legend": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string",
            "description": "Legend text of the grade. At most 500 characters.",
            "nullable": true
          },
          "isHealth": {
            "type": "boolean",
            "description": "True when the grade counts as a health value."
          },
          "includeInHealth": {
            "type": "boolean",
            "description": "True when the grade is included in health calculations."
          },
          "isDefault": {
            "type": "boolean",
            "description": "True when the grade becomes the column's default. The previous default is cleared."
          },
          "isDisplayMode": {
            "type": "boolean",
            "description": "True when the grade is shown in display mode."
          }
        },
        "additionalProperties": false,
        "description": "Create body for a template grade. The columnId is the binding source: it is resolved server-side\nto its template and client, and a column belonging to another template than the route's returns\n404 rather than redirecting the write."
      },
      "GroupTemplateGradeResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the grade.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Display name of the grade. Unique within its grade column.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the grade.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the grade.",
            "nullable": true
          },
          "legend": {
            "type": "string",
            "description": "Legend text of the grade.",
            "nullable": true
          },
          "isHealth": {
            "type": "boolean",
            "description": "True when the grade counts as a health value."
          },
          "includeInHealth": {
            "type": "boolean",
            "description": "True when the grade is included in health calculations."
          },
          "isDefault": {
            "type": "boolean",
            "description": "True when this is the column's default grade. Exactly one grade per column is default."
          },
          "isDisplayMode": {
            "type": "boolean",
            "description": "True when the grade is shown in display mode."
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the grade within its column.",
            "format": "double"
          },
          "columnId": {
            "type": "integer",
            "description": "Identifier of the grade column the grade belongs to.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "One grade of an assessment template. Grades always carry their full domain shape — colour,\nhealth flags, icon and legend — never id + name only."
      },
      "GroupTemplateGradeResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupTemplateGradeResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "GroupTemplateGradeResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GroupTemplateGradeResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "GroupTemplateGroupInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Display name of the group. Must be unique within the template and at most 50 characters."
          },
          "description": {
            "maxLength": 256,
            "minLength": 0,
            "type": "string",
            "description": "Description of the group. At most 256 characters.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the group is active. Defaults to true."
          },
          "marketIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Identifiers of the markets to limit the group to. Omit for a group that applies to every market.",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tag NAMES to attach to the group. Unknown names are created as template tags.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Create body for an assessment-template group. The group is appended to the end of the template —\nthe internal create computes the position itself and accepts no sortOrder, so use\npatchGroupTemplateGroup to move a group afterwards. Market ids are resolved against the caller's\nclient; one that belongs to another client is reported as not found."
      },
      "GroupTemplateGroupResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the group.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Display name of the group. Unique within its template.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the group.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "True when the group is active."
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the group within its template.",
            "format": "double"
          },
          "markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupTemplateRelatedRef"
            },
            "description": "Markets the group is limited to. Empty means the group applies to every market.",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupTemplateRelatedRef"
            },
            "description": "Tags attached to the group.",
            "nullable": true
          },
          "itemsCount": {
            "type": "integer",
            "description": "Number of items in the group.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "One group (category) of an assessment template. The group's items are not embedded — read them\nwith listGroupTemplateItems, filtered by groupId; itemsCount tells an agent how many to expect."
      },
      "GroupTemplateGroupResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupTemplateGroupResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "GroupTemplateGroupResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GroupTemplateGroupResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "GroupTemplateItemColumnResource": {
        "type": "object",
        "properties": {
          "columnId": {
            "type": "integer",
            "description": "Identifier of the template column.",
            "format": "int32"
          },
          "columnName": {
            "type": "string",
            "description": "Internal name of the template column (for example HealthStandard, Status, OneTimeBudget).",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "text",
              "dropDown",
              "grade",
              "name",
              "status",
              "risk",
              "solution",
              "targetYear",
              "month",
              "year",
              "oneTimeBudget",
              "recurringPeriod",
              "recurringBudget",
              "quantity",
              "recurringTotal",
              "effectiveDate",
              "cancellationDate",
              "helper",
              "itemTag",
              "date",
              "site",
              "healthStandard",
              "description",
              "qtr",
              "recurringAmount",
              "healthWeight",
              "referenceInstructions",
              "referenceLink",
              "initiative"
            ],
            "type": "string",
            "description": "What the column holds. Null when the column's type is not one of the known types.",
            "nullable": true
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupTemplateItemColumnSourceResource"
            },
            "description": "Every value the item holds for this column, ordered by sortOrder.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One column of a template item together with every value the item holds for it. This is the\nunflattened truth behind the item's text fields: a column carries a LIST of values, so a pick-list\ncolumn shows all of its options here while the flat field shows only the one in effect. The column's\navailable grades are not part of this — read them with listGroupTemplateGrades. Read-only."
      },
      "GroupTemplateItemColumnSourceResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the source row.",
            "format": "int32"
          },
          "value": {
            "type": "string",
            "description": "The value itself.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "True when this is the column's default value for the item."
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the value within its column.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One value an item holds for a column. A single-value column has exactly one of these; a pick-list\ncolumn (status, risk, solution, budget) has one per option, with at most one marked as the default.\nRead-only in this version."
      },
      "GroupTemplateItemInput": {
        "required": [
          "groupId",
          "name"
        ],
        "type": "object",
        "properties": {
          "groupId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Identifier of the template group to create the item in. Must belong to the template in the route.",
            "format": "int32"
          },
          "name": {
            "maxLength": 250,
            "minLength": 0,
            "type": "string",
            "description": "Name of the item. Must be unique within the group and at most 250 characters."
          },
          "description": {
            "maxLength": 1500,
            "minLength": 0,
            "type": "string",
            "description": "Description of the item. At most 1500 characters.",
            "nullable": true
          },
          "healthStandard": {
            "maxLength": 1500,
            "minLength": 0,
            "type": "string",
            "description": "Health standard of the item. Requires the template to carry a HealthStandard column. At most 1500 characters.",
            "nullable": true
          },
          "referenceInstructions": {
            "maxLength": 1500,
            "minLength": 0,
            "type": "string",
            "description": "Reference instructions of the item, as HTML. Requires the template to carry a ReferenceInstructions column. At most 1500 characters. The HTML is sanitized against the rich-text allowlist on write: unsupported markup is dropped, and a script element, an on* event-handler attribute or a javascript: URL returns 400 validationFailed with nothing written.",
            "nullable": true
          },
          "referenceLink": {
            "maxLength": 1500,
            "minLength": 0,
            "type": "string",
            "description": "Reference link of the item. Requires the template to carry a ReferenceLink column. At most 1500 characters.",
            "nullable": true
          },
          "weight": {
            "maximum": 5,
            "minimum": 0,
            "type": "integer",
            "description": "Health weight of the item, 0-5. Omit to leave the item without an explicit weight — reports then fall back to the global default of 3; it is not a per-template setting.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Create body for an assessment-template item. The item is appended to the end of its group. A text\nvalue the template has no column for is rejected rather than silently dropped, and the grade,\nstatus, risk, solution and budget values of an item are not part of this version."
      },
      "GroupTemplateItemResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the item. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name of the item. Unique within its group.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the item.",
            "nullable": true
          },
          "healthStandard": {
            "type": "string",
            "description": "Health standard of the item — what 'healthy' means for it.",
            "nullable": true
          },
          "referenceInstructions": {
            "type": "string",
            "description": "Reference instructions of the item.",
            "nullable": true
          },
          "referenceLink": {
            "type": "string",
            "description": "Reference link of the item.",
            "nullable": true
          },
          "weight": {
            "type": "integer",
            "description": "Health weight of the item, 0-5. Omitted when the item carries no explicit weight.",
            "format": "int32",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the item within its group.",
            "format": "double",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "True when the item is active.",
            "nullable": true
          },
          "groupId": {
            "type": "integer",
            "description": "Identifier of the template group the item belongs to.",
            "format": "int32",
            "nullable": true
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupTemplateItemColumnResource"
            },
            "description": "Every column the item holds a value for, with all of that column's values. The text fields above are the single value in effect for their column; this shows the full picture, including the options of a pick-list column (status, risk, solution, budgets). Read-only — writes go through the fields above.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One item of an assessment template. The text values are the item's per-column values — the same ones\na report built from this template shows — and groupId is the template group the item belongs to.\n            \nEvery value member is nullable because the item list (listGroupTemplateItems) projects this resource\nthrough the fields/view selection: a non-nullable member would serialize its default (sortOrder 0,\ngroupId 0, isActive false) for a field the caller did not ask for instead of disappearing from the\nJSON, i.e. it would report data that is not in the template. ToItemResource keeps assigning every\nmember, so the create / patch echoes still serialize the complete resource."
      },
      "GroupTemplateItemResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupTemplateItemResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "GroupTemplateItemResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GroupTemplateItemResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "GroupTemplateNoteUpdateInput": {
        "required": [
          "note"
        ],
        "type": "object",
        "properties": {
          "note": {
            "type": "string",
            "description": "Note HTML. An empty string clears the note. Images are managed internally and cannot be attached through this API."
          }
        },
        "additionalProperties": false,
        "description": "Body of patchGroupTemplateNote: the whole internal note of one assessment-template part, replaced outright.\nThe member is required — an absent body is not \"leave it as it is\", it is a bad request; send an empty\nstring to clear the note."
      },
      "GroupTemplatePartResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the template part.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the part.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the part.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the part.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "True when this is the template's default part.",
            "nullable": true
          },
          "isInternal": {
            "type": "boolean",
            "description": "True when the part is internal-only and not shown to end clients.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the part within the template.",
            "format": "double",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "True when the part is active.",
            "nullable": true
          },
          "isShowOnBuildMode": {
            "type": "boolean",
            "description": "True when the part is shown in build mode.",
            "nullable": true
          },
          "isShowOnDisplayMode": {
            "type": "boolean",
            "description": "True when the part is shown in display mode.",
            "nullable": true
          },
          "isShowOnPresentationMode": {
            "type": "boolean",
            "description": "True when the part is shown in presentation mode.",
            "nullable": true
          },
          "mergeFromPart": {
            "enum": [
              "undefined",
              "executiveSummary",
              "assessmentLegend",
              "assessment",
              "overview",
              "assetsLegend",
              "assets",
              "roadmap",
              "budget",
              "legend",
              "externalContent",
              "text",
              "embedHtml",
              "cover",
              "contacts",
              "office365",
              "tickets",
              "flexibleItems",
              "plan",
              "flexibleRoadmap",
              "flexibleBudget",
              "fiLegend",
              "initiatives",
              "agreements",
              "goals",
              "opportunities",
              "newDashboard",
              "projects"
            ],
            "type": "string",
            "description": "Part type this part merges its content from, in the same values as typeEnum. Omitted when the part does not merge.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "executiveSummary",
              "assessmentLegend",
              "assessment",
              "overview",
              "assetsLegend",
              "assets",
              "roadmap",
              "budget",
              "legend",
              "externalContent",
              "text",
              "embedHtml",
              "cover",
              "contacts",
              "office365",
              "tickets",
              "flexibleItems",
              "plan",
              "flexibleRoadmap",
              "flexibleBudget",
              "fiLegend",
              "initiatives",
              "agreements",
              "goals",
              "opportunities",
              "newDashboard",
              "projects"
            ],
            "type": "string",
            "description": "Type of the part (text, assessment, cover, plan, ...). It decides which sub-resources the part has. Same values as a report part's typeEnum, so a report part maps onto its template part by comparing this field."
          }
        },
        "additionalProperties": false,
        "description": "One part (section) of an assessment template."
      },
      "GroupTemplatePartResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupTemplatePartResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "GroupTemplateRelatedRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the related entity.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Display name of the related entity.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A related entity reference on the assessment-template surface: id + name."
      },
      "GroupTemplateResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the assessment template. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Template name, unique within the client.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Template description. Null when not set.",
            "nullable": true
          },
          "isRecurring": {
            "type": "boolean",
            "description": "True when reports built from this template recur on a schedule.",
            "nullable": true
          },
          "primaryUserLabel": {
            "type": "string",
            "description": "Label shown for the primary user on reports built from this template. Null when not set.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An assessment template (\"group template\") of the caller's client. Fields are omitted from the\nJSON when not selected via the fields/view parameters (only requested fields are returned; id is\nalways present).\n            \nIsDefault is deliberately NOT exposed: the internal list's flag is per-user presentation\n(s.Id == user.DefaultTemplateId) and the entity column's semantics are unverified."
      },
      "GroupTemplateResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupTemplateResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "GroupTemplateResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GroupTemplateResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "GroupTemplateScheduleBulkResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupTemplateScheduleResource"
            },
            "description": "The companies that WERE updated (or already had this primary user), as schedule entries. A company that failed is absent here and appears in errors instead, never in both.",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupTemplateScheduleItemError"
            },
            "description": "One entry per company that was NOT updated, with its id, code and message. Empty when every company updated.",
            "nullable": true
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id of this request; quote it in support requests to match the server logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Result of updateGroupTemplateSchedulePrimaryUser: the entries that now carry the user and the\ncompanies that were refused, each with a reason. True partial success: a refused company never\nstops the others."
      },
      "GroupTemplateScheduleItemError": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "integer",
            "description": "Id of the company this failure belongs to.",
            "format": "int32"
          },
          "code": {
            "enum": [
              "validationFailed",
              "notFound",
              "accessDenied",
              "internalError",
              "idempotencyKeyReused",
              "requestInProgress",
              "unauthenticated",
              "notImplemented",
              "rateLimited"
            ],
            "type": "string",
            "description": "Stable, documented error codes for the external API. Values are CONTRACT once shipped\n(rename = breaking change). New values are added as real cases appear; every addition must\nland in the External API Guide's error-code catalog in the same change."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation of why this company was not updated.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One per-company failure of updateGroupTemplateSchedulePrimaryUser."
      },
      "GroupTemplateSchedulePrimaryUserInput": {
        "required": [
          "companyIds",
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "minLength": 1,
            "type": "string",
            "description": "Id of the user to make the primary user, as a string GUID (see listUsers). Required."
          },
          "year": {
            "type": "integer",
            "description": "The schedule year to set. Optional; defaults to the current year. Accepted range 2000 to 2100.",
            "format": "int32",
            "nullable": true
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of the companies to update. Required and non-empty, at most 100 ids; an absent list is never read as \"all companies\". Every id must be one listGroupTemplateSchedules returns for the template and year; one unknown id is reported as not found and NOTHING is written."
          }
        },
        "additionalProperties": false,
        "description": "The body updateGroupTemplateSchedulePrimaryUser takes."
      },
      "GroupTemplateScheduleResource": {
        "type": "object",
        "properties": {
          "company": {
            "$ref": "#/components/schemas/RelatedEntityResource"
          },
          "templateId": {
            "type": "integer",
            "description": "Id of the template the entry belongs to.",
            "format": "int32"
          },
          "year": {
            "type": "integer",
            "description": "The schedule year of the entry.",
            "format": "int32"
          },
          "primaryUser": {
            "$ref": "#/components/schemas/CompanyUserRef"
          },
          "primaryUserLabel": {
            "type": "string",
            "description": "The template's label for the primary user, e.g. \"vCIO\" or \"Account manager\".",
            "nullable": true
          },
          "reportsPerYear": {
            "type": "integer",
            "description": "How many reports are planned for the company in this year. 1 when no entry is stored yet.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "One company's schedule entry for a template and a year: who is its primary user (the vCIO / account\nmanager, labelled by the template) and how many reports are planned. A company with no stored entry\nfor that year is still listed, with no primary user and one report per year, which is what the\nSchedule screen shows for it."
      },
      "GroupTemplateScheduleResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupTemplateScheduleResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "GroupTemplateScheduleResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GroupTemplateScheduleResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "GroupTemplateSummaryNoteResource": {
        "type": "object",
        "properties": {
          "partId": {
            "type": "integer",
            "description": "Id of the template part the content belongs to.",
            "format": "int32"
          },
          "partName": {
            "type": "string",
            "description": "Display name of the template part.",
            "nullable": true
          },
          "partTypeEnum": {
            "enum": [
              "undefined",
              "executiveSummary",
              "assessmentLegend",
              "assessment",
              "overview",
              "assetsLegend",
              "assets",
              "roadmap",
              "budget",
              "legend",
              "externalContent",
              "text",
              "embedHtml",
              "cover",
              "contacts",
              "office365",
              "tickets",
              "flexibleItems",
              "plan",
              "flexibleRoadmap",
              "flexibleBudget",
              "fiLegend",
              "initiatives",
              "agreements",
              "goals",
              "opportunities",
              "newDashboard",
              "projects"
            ],
            "type": "string",
            "description": "Type of the template part, in the same values as a template part's typeEnum."
          },
          "executiveSummary": {
            "type": "string",
            "description": "Executive summary HTML of the part. Null when never written.",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Note HTML of the part. Null when never written.",
            "nullable": true
          },
          "isNoteIncluded": {
            "type": "boolean",
            "description": "Whether the note is included on the part — sourced from the text part's includeNote flag."
          }
        },
        "additionalProperties": false,
        "description": "The executive summary and note CONTENT of one template part, plus the part's own identity so the\nresponse can be correlated without replaying the request arguments. Same shape as\ngetReportPartSummaryAndNote on the report side."
      },
      "GroupTemplateSummaryNoteResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GroupTemplateSummaryNoteResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "GroupTemplateTextPartResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the text part.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Display name of the part.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the part.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the part.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the part within the template.",
            "format": "double"
          },
          "isActive": {
            "type": "boolean",
            "description": "True when the part is active."
          },
          "isDefault": {
            "type": "boolean",
            "description": "True when this is the template's default part."
          },
          "isShowOnBuildMode": {
            "type": "boolean",
            "description": "True when the part is shown in build mode."
          },
          "isShowOnDisplayMode": {
            "type": "boolean",
            "description": "True when the part is shown in display mode."
          },
          "isShowOnPresentationMode": {
            "type": "boolean",
            "description": "True when the part is shown in presentation mode."
          },
          "includeNote": {
            "type": "boolean",
            "description": "True when the part's note is included on the report. Same flag the summaryAndNote resource reports as isNoteIncluded."
          }
        },
        "additionalProperties": false,
        "description": "The text part of an assessment template — its shell/metadata and the include-note flag, NOT the\nexecutive summary or note content (those live on the summaryAndNote resource)."
      },
      "GroupTemplateTextPartResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GroupTemplateTextPartResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "InitiativeAssessmentItemsLinkInput": {
        "required": [
          "assessmentItemIds"
        ],
        "type": "object",
        "properties": {
          "assessmentItemIds": {
            "maxItems": 100,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Assessment item ids, the itemId of listAssessmentItems (the id of listReportAssessmentItems). Required, 1-100 positive ids; a repeated id counts once. An empty, longer or non-positive list fails the whole request with nothing written."
          }
        },
        "additionalProperties": false,
        "description": "Body of linkInitiativeItemAssessmentItems and unlinkInitiativeItemAssessmentItems: the assessment items (findings)\nto link to, or unlink from, one initiative item. Ids are handled independently: each one that cannot be written is\nreported in the response's errors."
      },
      "InitiativeBudgetTotalsResource": {
        "type": "object",
        "properties": {
          "items": {
            "type": "integer",
            "description": "Matching items, whatever the page.",
            "format": "int32"
          },
          "oneTimeBudget": {
            "type": "number",
            "description": "The sum of their one-time budgets.",
            "format": "double"
          },
          "recurringBudget": {
            "type": "number",
            "description": "The sum of their recurring budgets, per period as entered (not annualized).",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "The matched initiative items and the sums of their budgets."
      },
      "InitiativeColumnOptionModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the option. A string GUID, the value an item's status or priority carries.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Label of the option as it is shown in the application.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Swatch colour of the option. Free-form text — the web application writes a hex string such as \"#0085ff\", but no format is enforced — or null when the option carries none.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "True for the option applied to a new item that names no status / priority of its own."
          }
        },
        "additionalProperties": false,
        "description": "One selectable option of a Status, Priority or custom single-select dropdown column. The id is the\nstring GUID an item's value in that column carries — for Status / Priority also the statusId /\npriorityId filters — and the option list itself is read-only on this surface for every column type:\nthe core refuses an edited option list outright. A custom dropdown column is not creatable through\nany API (Task #14201 closed column create for every role), so one can exist only from before that\nseed or from a DB seed — but nothing rules it out, and when it exists its options publish through the\nsame contract as Status / Priority."
      },
      "InitiativeColumnResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the column.",
            "format": "int32"
          },
          "label": {
            "type": "string",
            "description": "Display label of the column.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the column, or null.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "customAppField",
              "customIntegrationField",
              "month",
              "year",
              "oneTimeBudget",
              "recurringBudget",
              "recurringPeriod",
              "quantity",
              "recurringTotal",
              "effectiveDate",
              "cancellationDate",
              "company",
              "site",
              "priority",
              "budgetEstimate",
              "tags",
              "status",
              "name",
              "summary",
              "nextSteps",
              "assignee",
              "itemsBudget",
              "laborBudget",
              "partsBudget",
              "includeInBudget",
              "goals",
              "assessmentItems",
              "technologyItems",
              "opportunities",
              "projects"
            ],
            "type": "string",
            "description": "Which field of an item the column describes. customAppField / customIntegrationField mark a custom column whose values arrive in the item's columnValues."
          },
          "customColumnTypeEnum": {
            "enum": [
              "undefined",
              "singleSelectDropDown",
              "text",
              "date",
              "user",
              "checkbox",
              "link",
              "image",
              "number",
              "html",
              "age",
              "smartMemory",
              "smartOS",
              "class"
            ],
            "type": "string",
            "description": "Value type of a custom column — how to read the values it holds. Null for typed system columns.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the column is shown in the application."
          },
          "isRecurring": {
            "type": "boolean",
            "description": "Whether the column belongs to the batch-toggled recurring-columns group."
          },
          "isInternal": {
            "type": "boolean",
            "description": "Whether the column is marked internal (hidden from external client users)."
          },
          "isInternalAllowed": {
            "type": "boolean",
            "description": "Whether patchInitiativeColumn may set isInternal on this column. False for the columns that feed the Flexible Budget and Roadmap rollups — month, year, the one-time and recurring budget, the recurring period and total, quantity, and the effective and cancellation dates. Patching /isInternal to true on one of those answers 400 validationFailed; setting it to false is always accepted."
          },
          "isEditable": {
            "type": "boolean",
            "description": "Whether patchInitiativeItem / patchInitiativeItems may write this column's value for an item. This is about item VALUES — it says nothing about patchInitiativeColumn, which edits the column itself.",
            "nullable": true
          },
          "patchPath": {
            "type": "string",
            "description": "The item-patch JSON Patch path that writes this column, for example /statusId, /month or /columns/17. Absent when isEditable is false. patchInitiativeItem and patchInitiativeItems take this exact path, and createInitiativeItem's columnValues is keyed by the same column id.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the column in the module's column order.",
            "format": "double"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeColumnOptionModel"
            },
            "description": "Selectable options of the column. Populated only for the Status and Priority columns; null for every other column. Read-only for every column type — this API publishes no option write.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One column definition of the Initiatives module. A typed system column (name, status, month,\nbudget, …) describes an intrinsic field of an item; a custom column (customAppField /\ncustomIntegrationField) describes a slot whose values arrive in an item's columnValues, and its\ncustomColumnTypeEnum says how to read those values.\n            \nThe definition itself is writable through patchInitiativeColumn and\nupdateInitiativeColumnSortOrder; creating a column is not available on any API,\ninternal or external. isEditable and patchPath are about a different question — whether an ITEM\npatch may write this column's value for one item, and which path does it."
      },
      "InitiativeColumnResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeColumnResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "InitiativeColumnResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InitiativeColumnResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "InitiativeColumnSortOrderInput": {
        "type": "object",
        "properties": {
          "afterColumnId": {
            "type": "integer",
            "description": "Id of the column the moved column lands directly after. null, 0 or an omitted property all mean the FIRST position. An anchor you cannot see answers notFound, exactly as reading it would. Anchoring a column on itself is a no-op that returns the column unchanged.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of `updateInitiativeColumnSortOrder`: the column the moved column lands AFTER.\nInsert-after rather than an absolute index, for the same reason the item reorder takes one — a\nconcurrent write elsewhere in the sequence cannot silently move the column somewhere the caller did\nnot ask for."
      },
      "InitiativeColumnValueInput": {
        "type": "object",
        "properties": {
          "value": {
            "description": "The value itself, in the JSON type the column declares (see the column's customColumnTypeEnum). Send null to clear the column.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of this value among the values the item holds in the same column. Send 0 when unsure.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One value to write into a custom column of an initiative item. The value is sent in the JSON type\nthe column declares — which one that is follows from the paired column's typeEnum /\ncustomColumnTypeEnum in listInitiativeColumns. A column accepts a single value."
      },
      "InitiativeColumnValueModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the stored value row. Stable for as long as the value exists.",
            "format": "int32"
          },
          "value": {
            "description": "The value itself, in the JSON type the column declares (see the column's customColumnTypeEnum).",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of this value among the values the item holds in the same column.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One value an initiative item holds in a custom column. The value is returned in its own JSON type\n(boolean, number, date-time string or text) — which one it is follows from the paired column's\ntypeEnum / customColumnTypeEnum in listInitiativeColumns."
      },
      "InitiativeCountLineResource": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The status label, the quarter (\"2026-Q1\", or \"unscheduled\" for no budget month or year) or the client name; \"(none)\" is the status line of the items with no status.",
            "nullable": true
          },
          "count": {
            "type": "integer",
            "description": "Matching items in the group.",
            "format": "int32"
          },
          "oneTimeBudget": {
            "type": "number",
            "description": "The sum of their one-time budgets (an item without one adds nothing).",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One group of the matched initiative items: a status, a calendar quarter or a client."
      },
      "InitiativeItemAssigneeRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the assignee. A string GUID (see listUsers), or null when the user account was deleted.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the assignee (first and last), falling back to the stored name of a deleted user.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The user an initiative item is assigned to. The id is a string GUID (see listUsers). When the user\naccount has been deleted the id is null and the name still carries the snapshot the delete flow\nwrote, so the item keeps reading as assigned to a person rather than to nobody."
      },
      "InitiativeItemColumnValuesInput": {
        "type": "object",
        "properties": {
          "columnId": {
            "type": "integer",
            "description": "Id of the custom column these values belong to, from the column list of the SCOPE you are creating in (listInitiativeColumns or listReportInitiativeColumns). A column you cannot see is reported as notFound, exactly as an unknown id is.",
            "format": "int32"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeColumnValueInput"
            },
            "description": "The values to store in that column. A column accepts a single value.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The values to write into ONE custom column of a new initiative item. Typed system columns (name,\nstatus, month, budget, …) are intrinsic fields of the create body and never appear here — only\ncustom columns do."
      },
      "InitiativeItemColumnValuesModel": {
        "type": "object",
        "properties": {
          "columnId": {
            "type": "integer",
            "description": "Id of the column these values belong to (see listInitiativeColumns).",
            "format": "int32"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeColumnValueModel"
            },
            "description": "The values held in that column, in their stored order. Most columns hold a single value.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The values an initiative item holds in one custom column. Typed system columns (name, status,\nmonth, budget, …) are intrinsic fields of the item and never appear here — only custom columns do."
      },
      "InitiativeItemContentModel": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "The item's HTML content, or null when it has none. Sent whole — the write replaces the stored string, it does not merge into it. Images embedded in this HTML are NOT retrievable through this API: v1 serves no image blobs, so an <img> in the content points at something an external caller cannot fetch. The HTML is sanitized against the rich-text allowlist on write: unsupported markup is dropped, and a script element, an on* event-handler attribute or a javascript: URL returns 400 validationFailed with nothing written.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The long-form HTML content of one initiative item — the body of both content operations, sent to\nupdateInitiativeItemContent and returned by it and by getInitiativeItemContent. One shape both\nways, because the write is a full replacement of the same single string. The content never\nappears on InitiativeItemResource, which carries only its contentLength."
      },
      "InitiativeItemContentModelExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InitiativeItemContentModel"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "InitiativeItemCreateResource": {
        "required": [
          "companyId",
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Display name of the item. Max 255 characters."
          },
          "summary": {
            "type": "string",
            "description": "Short summary of the item. Max 1000 characters.",
            "nullable": true
          },
          "nextSteps": {
            "type": "string",
            "description": "Next steps recorded on the item. Max 8000 characters.",
            "nullable": true
          },
          "siteId": {
            "type": "integer",
            "description": "Site to place the item at. Must be an ACTIVE site of the item's company. Sites have no listing operation — read the id off an item's site object.",
            "format": "int32",
            "nullable": true
          },
          "assigneeId": {
            "type": "string",
            "description": "User to assign the item to (string GUID, see listUsers). Must have access to the item's company.",
            "nullable": true
          },
          "statusId": {
            "type": "string",
            "description": "Status option id, from the Status column's options in the COLUMN LIST OF THE SCOPE you are creating in — listInitiativeColumns in module scope, listReportInitiativeColumns in report scope. Omit to take the option marked isDefault.",
            "nullable": true
          },
          "priorityId": {
            "type": "string",
            "description": "Priority option id, from the Priority column's options in the column list of the SCOPE you are creating in (listInitiativeColumns or listReportInitiativeColumns). Omit to take the option marked isDefault.",
            "nullable": true
          },
          "budgetEstimate": {
            "type": "string",
            "description": "Free-text budget range, for example \"$5k-$10k\". Max 50 characters.",
            "nullable": true
          },
          "itemsBudget": {
            "type": "number",
            "description": "Related Items line of the one-time budget (the related Technology Items). The item's oneTimeBudget is the sum of the three lines and cannot be set directly.",
            "format": "double",
            "nullable": true
          },
          "laborBudget": {
            "type": "number",
            "description": "Labor line of the one-time budget.",
            "format": "double",
            "nullable": true
          },
          "partsBudget": {
            "type": "number",
            "description": "Parts line of the one-time budget.",
            "format": "double",
            "nullable": true
          },
          "recurringBudget": {
            "type": "number",
            "description": "Recurring budget of the item.",
            "format": "double",
            "nullable": true
          },
          "recurringPeriod": {
            "type": "integer",
            "description": "Number of periods the recurring budget covers.",
            "format": "int32",
            "nullable": true
          },
          "recurringTotal": {
            "type": "number",
            "description": "Total of the recurring budget over its periods.",
            "format": "double",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity recorded on the item.",
            "format": "int32",
            "nullable": true
          },
          "month": {
            "type": "integer",
            "description": "Budget month of the item (1-12).",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Budget year of the item.",
            "format": "int32",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Effective date of the item (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "cancellationDate": {
            "type": "string",
            "description": "Cancellation date of the item (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "tagsIds": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Tags to assign to the item, from the tag list of the SCOPE you are creating in (listInitiativeTags or listReportInitiativeTags). Max 50.",
            "nullable": true
          },
          "columnValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeItemColumnValuesInput"
            },
            "description": "Values to store in the item's custom columns, one entry per column. Typed system fields have their own members above and never appear here.",
            "nullable": true
          },
          "companyId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Company the item belongs to (see listCompanies). Must be a company you can see.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Body of createInitiativeItem: the shared create fields (External.API.Models.Initiatives.InitiativeItemCreateResourceBase)\nplus the company, which is module-scope only. The module list spans every company the caller can see,\nso a create there has to say which one the item belongs to; the report-scope twin has no such field\n(External.API.Models.Initiatives.ReportInitiativeItemCreateResource)."
      },
      "InitiativeItemPriorityRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the priority option. A string GUID from the Priority column's options (see listInitiativeColumns).",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Label of the priority option, resolved from the Priority column's option list.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The priority of an initiative item, resolved against the Priority column's option list. The id is\na string GUID that identifies one option inside that list — it is not a row id and there is no\npriority table; the same value is what the priorityId filter takes."
      },
      "InitiativeItemRelationshipsLinkResponse": {
        "type": "object",
        "properties": {
          "relationships": {
            "$ref": "#/components/schemas/InitiativeItemRelationshipsResource"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelationshipLinkItemError"
            },
            "description": "The ids that were not linked (or not unlinked), one entry each with a code and a message naming the records. Empty when every id was written; on a link, a pair that was already linked is not an error.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Result of the initiative item link and unlink operations, the data of the { data, requestId } envelope: the item's\nrelationships after the write and one error per id that was not written, a true partial success. The body is\nvalidated FIRST, so a malformed one is a 400 that writes nothing; once it is valid this arrives with 200 even when\nevery id failed."
      },
      "InitiativeItemRelationshipsLinkResponseExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InitiativeItemRelationshipsLinkResponse"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "InitiativeItemRelationshipsResource": {
        "type": "object",
        "properties": {
          "technologyItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeLinkedTechnologyItemResource"
            },
            "description": "Technology items linked to the item (see listTechnologyItems), in technology group order. Empty when none you can see is linked.",
            "nullable": true
          },
          "assessmentItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeLinkedAssessmentItemResource"
            },
            "description": "Assessment items (findings) of draft reports linked to the item (see listAssessmentItems), in report order. Empty when none you can see is linked.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The initiative item's relationships, read-only: the technology items and the assessment items (findings) linked to\nthe item that you can see. On getInitiativeItem and listInitiativeItems in the Full view (or with\nfields=Relationships), and on the link responses; links are added with linkInitiativeItemTechnologyItems and\nlinkInitiativeItemAssessmentItems and removed with their unlink twins. The arrays are never null: an empty array\nmeans nothing you can see is linked."
      },
      "InitiativeItemResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the initiative item. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the initiative item.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the item in the module's own manual order. Read-only on this surface.",
            "format": "double",
            "nullable": true
          },
          "company": {
            "$ref": "#/components/schemas/InitiativeRelatedRef"
          },
          "status": {
            "$ref": "#/components/schemas/InitiativeItemStatusRef"
          },
          "priority": {
            "$ref": "#/components/schemas/InitiativeItemPriorityRef"
          },
          "month": {
            "type": "integer",
            "description": "Budget month of the item (1-12), or null.",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Budget year of the item, or null.",
            "format": "int32",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeItemTagRef"
            },
            "description": "Tags assigned to the item (id + name + colour; filter with tagId, see listInitiativeTags).",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "description": "Short summary of the item. Only present in the Full view.",
            "nullable": true
          },
          "nextSteps": {
            "type": "string",
            "description": "Next steps recorded on the item. Only present in the Full view.",
            "nullable": true
          },
          "budgetEstimate": {
            "type": "string",
            "description": "Free-text budget range, for example \"$5k-$10k\". Only present in the Full view.",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "number",
            "description": "One-time budget of the item — the sum of itemsBudget, laborBudget and partsBudget. Read-only: write the three lines instead. Only present in the Full view.",
            "format": "double",
            "nullable": true
          },
          "itemsBudget": {
            "type": "number",
            "description": "Related Items line of the one-time budget (the related Technology Items). Only present in the Full view.",
            "format": "double",
            "nullable": true
          },
          "laborBudget": {
            "type": "number",
            "description": "Labor line of the one-time budget. Only present in the Full view.",
            "format": "double",
            "nullable": true
          },
          "partsBudget": {
            "type": "number",
            "description": "Parts line of the one-time budget. Only present in the Full view.",
            "format": "double",
            "nullable": true
          },
          "recurringBudget": {
            "type": "number",
            "description": "Recurring budget of the item. Only present in the Full view.",
            "format": "double",
            "nullable": true
          },
          "recurringPeriod": {
            "type": "integer",
            "description": "Number of periods the recurring budget covers. Only present in the Full view.",
            "format": "int32",
            "nullable": true
          },
          "recurringTotal": {
            "type": "number",
            "description": "Total of the recurring budget over its periods. Only present in the Full view.",
            "format": "double",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity recorded on the item. Only present in the Full view.",
            "format": "int32",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Effective date of the item (UTC). Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "cancellationDate": {
            "type": "string",
            "description": "Cancellation date of the item (UTC). Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "site": {
            "$ref": "#/components/schemas/InitiativeRelatedRef"
          },
          "assignee": {
            "$ref": "#/components/schemas/InitiativeItemAssigneeRef"
          },
          "contentLength": {
            "type": "integer",
            "description": "Length in characters of the item's HTML content. The content itself is not on this resource. Only present in the Full view.",
            "format": "int32",
            "nullable": true
          },
          "columnValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeItemColumnValuesModel"
            },
            "description": "Values the item holds in the custom columns, grouped per column. Only present in the Full view.",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "When the item was created (UTC). Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "description": "When the item was last updated (UTC). Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "goals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeRelatedRef"
            },
            "description": "Goals the item is linked to (id + name, in goal order; filter with goalId, see listGoals); [] when it has none. Only present in the Full view, and only for a role that reads goals and sees the Initiatives Goals column.",
            "nullable": true
          },
          "relationships": {
            "$ref": "#/components/schemas/InitiativeItemRelationshipsResource"
          }
        },
        "additionalProperties": false,
        "description": "One initiative item of the caller's client, in a company the caller can see. Fields are omitted\nfrom the JSON when not selected via the fields / view parameters (only requested fields are\nreturned; id is always present). The item's long-form HTML content is never on this resource — it\ntravels only through the dedicated content operations; contentLength says how large it is."
      },
      "InitiativeItemResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeItemResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "InitiativeItemResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InitiativeItemResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "InitiativeItemSortOrderInput": {
        "type": "object",
        "properties": {
          "afterItemId": {
            "type": "integer",
            "description": "Id of the item the moved item lands directly after. null, 0 or an omitted property all mean the FIRST position. An anchor you cannot see answers notFound, exactly as reading it would. Anchoring an item on itself is a no-op that returns the item unchanged.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of `updateInitiativeItemSortOrder`: the item the moved item lands AFTER. Insert-after\nrather than an absolute index, so a concurrent write elsewhere in the sequence cannot silently move\nthe item somewhere the caller did not ask for — the same contract the module's internal drag-and-drop\ntakes (`InitiativeItemOrderUpdateModel.ItemIdAfterSort`)."
      },
      "InitiativeItemStatusRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the status option. A string GUID from the Status column's options (see listInitiativeColumns).",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Label of the status option, resolved from the Status column's option list.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The status of an initiative item, resolved against the Status column's option list. The id is a\nstring GUID that identifies one option inside that list — it is not a row id and there is no\nstatus table; the same value is what the statusId filter takes."
      },
      "InitiativeItemTagRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the tag (see listInitiativeTags).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the tag.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Swatch colour of the tag. Free-form text — the web application writes a hex string such as \"#0085ff\", but no format is enforced — or null when the tag carries none.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One tag assigned to an initiative item, from the Initiatives module's own tag vocabulary. Use the\nid with the tagId filter or with listInitiativeTags."
      },
      "InitiativeItemsBulkPatchInput": {
        "required": [
          "entityIds"
        ],
        "type": "object",
        "properties": {
          "entityIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of the initiative items to patch. Required and non-empty; an empty list is never read as \"all items\". At most 100 ids per request (configurable) — a repeated id counts toward that cap on every occurrence, it is not de-duplicated first; the response still carries one envelope entry per distinct id."
          },
          "patch": {
            "type": "array",
            "items": {
              "required": [
                "op",
                "path"
              ],
              "type": "object",
              "properties": {
                "op": {
                  "type": "string",
                  "description": "Operation to perform: add, remove, replace, move, copy or test."
                },
                "path": {
                  "type": "string",
                  "description": "JSON Pointer to the target member, spelled exactly as THIS operation's own description documents its patchable paths — the casing differs per operation, so never carry a path from one operation to another."
                },
                "value": {
                  "description": "New value for add, replace and test. Any JSON type: string, number, boolean, array, object or null."
                },
                "from": {
                  "type": "string",
                  "description": "Source JSON Pointer. Required by move and copy, unused otherwise."
                }
              }
            },
            "description": "The RFC 6902 operation array to apply to every listed item. The paths are the ones the matching single patch writes — /companyId, /siteId, /assigneeId, /statusId, /priorityId, /name, /summary, /nextSteps, /budgetEstimate, /oneTimeBudget, /recurringBudget, /recurringPeriod, /recurringTotal, /quantity, /month, /year, /effectiveDate, /cancellationDate, /tagsIds and /columns/{columnId}. Any other path is refused and NOTHING is written. One scope difference: /companyId is writable through patchInitiativeItems (module scope) but REFUSED by patchReportInitiativeItems (report scope), where a report renders exactly one company — there too the whole document is refused and nothing is written."
          }
        },
        "additionalProperties": false,
        "description": "Bulk patch request: apply ONE JSON Patch to many initiative items by explicit id. The wrapper is\napplication/json; External.API.Models.Initiatives.InitiativeItemsBulkPatchInput.Patch is the raw RFC 6902 operation array, bound as a JsonElement\nbecause System.Text.Json cannot materialize a JsonPatchDocument — the controller service converts it.\n            \nShared by the module scope (`patchInitiativeItems`) and the report-part scope\n(`patchReportInitiativeItems`): both publish the same item resource and the same patchable\npaths, so a second copy would let the two tool families drift. The ONE difference is /companyId,\nwhich the report scope refuses — a report renders exactly one company — and which the module scope\nwrites normally. Both operations therefore describe the same schema, and this description states\nwhich scope refuses what rather than leaving an agent to discover it from a 400."
      },
      "InitiativeItemsBulkPatchItemError": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the item this failure belongs to — one of the entityIds sent in the request.",
            "format": "int32"
          },
          "code": {
            "enum": [
              "validationFailed",
              "notFound",
              "accessDenied",
              "internalError",
              "idempotencyKeyReused",
              "requestInProgress",
              "unauthenticated",
              "notImplemented",
              "rateLimited"
            ],
            "type": "string",
            "description": "Stable, documented error codes for the external API. Values are CONTRACT once shipped\n(rename = breaking change). New values are added as real cases appear; every addition must\nland in the External API Guide's error-code catalog in the same change."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation of why this item was not patched.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One per-item failure in an initiative items bulk patch: the item id, a machine-readable code (the\nshared ExternalErrorCode, so it matches the single-resource error contract) and a human-readable\nmessage. Shared by both bulk patches — patchInitiativeItems (module scope) and\npatchReportInitiativeItems (report scope)."
      },
      "InitiativeItemsBulkPatchResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeItemResource"
            },
            "description": "The items that WERE patched, as full resources — the same shape getInitiativeItem answers with. An item that failed is absent here and appears in errors instead, never in both.",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeItemsBulkPatchItemError"
            },
            "description": "One entry per item that was NOT patched, each with its id, code and message. Empty when every requested item updated.",
            "nullable": true
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id of this request; quote it in support requests to match the server logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Bulk patch result envelope: the items that updated (External.API.Models.Initiatives.InitiativeItemsBulkPatchResponse.Items, full resources) and the\nper-item failures (External.API.Models.Initiatives.InitiativeItemsBulkPatchResponse.Errors) — true partial success. RequestId correlates with the logs,\nmirroring the single-resource responses. Shared by both bulk patches — patchInitiativeItems (module\nscope) and patchReportInitiativeItems (report scope)."
      },
      "InitiativeLinkedAssessmentItemResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the assessment item: the itemId listAssessmentItems returns (the id listReportAssessmentItems returns). Filter the initiative items with assessmentItemId.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the assessment item.",
            "nullable": true
          },
          "report": {
            "$ref": "#/components/schemas/InitiativeRelatedRef"
          }
        },
        "additionalProperties": false,
        "description": "An assessment item (finding) linked to an initiative item, as the item's relationships block shows it. Only a\ndraft report's findings are linked: completing a report freezes its links into the report."
      },
      "InitiativeLinkedTechnologyItemResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the technology item: the id listTechnologyItems returns (listReportTechnologyItems returns the same id for a draft report). Filter the initiative items with technologyItemId.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the technology item (the value of its group's Name column). Absent when the item has none.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A technology item linked to an initiative item, as the item's relationships block shows it."
      },
      "InitiativeRecurringColumnsInput": {
        "required": [
          "isActive"
        ],
        "type": "object",
        "properties": {
          "isActive": {
            "type": "boolean",
            "description": "Whether every column of the recurring group is shown in the application. Required — an omitted field is rejected rather than read as false. Turning the group off also clears the calling credential's own saved filter values on those columns; it keeps every item value."
          }
        },
        "additionalProperties": false,
        "description": "Body of `updateInitiativeRecurringColumns`: the activation state applied to the whole\nrecurring-columns group at once. There is no per-column form of this write on any surface.\n            \nThe field is nullable and required on purpose, exactly as `PlanRecurringColumnsInput` is: a\nnon-nullable bool binds an omitted field to `false`, so a body of `{}` would silently hide\nthe whole recurring group and answer a success. Nullable + `[Required]` makes that body a 400\nbefore the operation runs."
      },
      "InitiativeRelatedRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the related entity.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the related entity.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A related entity of an initiative item that is keyed by an integer id — the company the item\nbelongs to, the site it is placed at and the goals it is linked to. Carries id + name in every view,\nper the shared related-entity rule."
      },
      "InitiativeRowResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name; omitted when your role may not see the company.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Item name; omitted when your role may not see the name.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label; omitted when the item has none, or when your role may not see the status.",
            "nullable": true
          },
          "priority": {
            "type": "string",
            "description": "Priority label; omitted when the item has none, or when your role may not see the priority.",
            "nullable": true
          },
          "month": {
            "type": "integer",
            "description": "Budget month 1-12.",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Budget year.",
            "format": "int32",
            "nullable": true
          },
          "quarter": {
            "type": "string",
            "description": "Calendar quarter of the budget month, Q1 to Q4, or unscheduled when the month or the year is not set.",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "number",
            "description": "One-time budget: the sum of itemsBudget, laborBudget and partsBudget (read-only; set the lines).",
            "format": "double",
            "nullable": true
          },
          "itemsBudget": {
            "type": "number",
            "description": "Related Items line of the one-time budget (the related Technology Items).",
            "format": "double",
            "nullable": true
          },
          "laborBudget": {
            "type": "number",
            "description": "Labor line of the one-time budget.",
            "format": "double",
            "nullable": true
          },
          "partsBudget": {
            "type": "number",
            "description": "Parts line of the one-time budget.",
            "format": "double",
            "nullable": true
          },
          "recurringBudget": {
            "type": "number",
            "description": "Recurring budget per period.",
            "format": "double",
            "nullable": true
          },
          "assignee": {
            "type": "string",
            "description": "The assignee's full name (a deleted user's name as it was); omitted when unassigned, or when your role may not see the assignee.",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tag names, in the tag library's order; omitted when your role may not see the tags.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One initiative item, by names only. A field your role may not see is omitted."
      },
      "InitiativeTagCreateResource": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string",
            "description": "Name of the tag. Trimmed before it is stored, may not be blank, and must be unique within the client's Initiatives tag vocabulary (case-insensitive). Max 50 characters."
          },
          "color": {
            "maxLength": 50,
            "type": "string",
            "description": "Swatch colour of the tag. Free-form text, trimmed, otherwise stored as sent — the web application writes a hex string such as \"#0085ff\", but no format is enforced. Omit it, or send null, for a tag without one. Max 50 characters.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of createInitiativeTag. The tag lands at the END of the Tags Library order — there is no\nposition on this surface. The name is trimmed before it is stored and must be unique within the\nclient's Initiatives vocabulary; the comparison is case-insensitive."
      },
      "InitiativeTagResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the tag. Use it with the tagId filter of listInitiativeItems.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the tag. Unique within the client.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Swatch colour of the tag. Free-form text — the web application writes a hex string such as \"#0085ff\", but no format is enforced — or null when the tag carries none.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the tag in the Tags Library order.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One tag of the Initiatives module's own tag vocabulary. The library is client-wide and separate\nfrom the tags used by reports, plans and metrics; items reference these tags by id."
      },
      "InitiativeTagResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeTagResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "InitiativeTagResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InitiativeTagResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "InitiativeTagSortOrderInput": {
        "type": "object",
        "properties": {
          "afterTagId": {
            "type": "integer",
            "description": "Id of the tag the moved tag lands directly after. null, 0 or an omitted property all mean the FIRST position. An anchor you cannot see answers notFound, exactly as reading it would. Anchoring a tag on itself is a no-op that returns the tag unchanged.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of `updateInitiativeTagSortOrder`: the tag the moved tag lands AFTER. Same insert-after\nconvention as the item and column reorders on this surface."
      },
      "InitiativeTechnologyItemsLinkInput": {
        "required": [
          "technologyItemIds"
        ],
        "type": "object",
        "properties": {
          "technologyItemIds": {
            "maxItems": 100,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Technology item ids, the id of listTechnologyItems. Required, 1-100 positive ids; a repeated id counts once. An empty, longer or non-positive list fails the whole request with nothing written."
          }
        },
        "additionalProperties": false,
        "description": "Body of linkInitiativeItemTechnologyItems and unlinkInitiativeItemTechnologyItems: the technology items to link to,\nor unlink from, one initiative item. Ids are handled independently: each one that cannot be written is reported in\nthe response's errors."
      },
      "InitiativeTemplateContentModel": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "The template's HTML content, copied onto items created from the template, or null when it has none. Sent whole — the write replaces the stored string, it does not merge into it, and null clears it. Images embedded in this HTML are NOT retrievable through this API: v1 serves no image blobs, so an <img> in the content points at something an external caller cannot fetch. The HTML is sanitized against the rich-text allowlist on write: unsupported markup is dropped, and a script element, an on* event-handler attribute or a javascript: URL returns 400 validationFailed with nothing written.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The long-form HTML content of one initiative template, the template twin of InitiativeItemContentModel: the\nbody of both template content operations, sent to updateInitiativeTemplateContent and returned by it and by\ngetInitiativeTemplateContent. One shape both ways, because the write is a full replacement of the same single\nstring. The content is copied onto items created from the template; it never appears on\nInitiativeTemplateResource, which carries only its contentLength."
      },
      "InitiativeTemplateContentModelExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InitiativeTemplateContentModel"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "InitiativeTemplateCreateResource": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "Display name of the template. Required, max 255 characters, trimmed. A name another template of your client holds, compared case-insensitively, is validationFailed and nothing is created."
          },
          "summary": {
            "maxLength": 1000,
            "type": "string",
            "description": "Short summary of the template. Max 1000 characters.",
            "nullable": true
          },
          "nextSteps": {
            "maxLength": 8000,
            "type": "string",
            "description": "Next steps recorded on the template. Max 8000 characters.",
            "nullable": true
          },
          "priorityId": {
            "type": "string",
            "description": "Priority option id, from the Priority column's options in listInitiativeColumns. Omit for a template without a priority.",
            "nullable": true
          },
          "budgetEstimate": {
            "maxLength": 50,
            "type": "string",
            "description": "Free-text budget range, for example \"$5k-$10k\". Max 50 characters.",
            "nullable": true
          },
          "itemsBudget": {
            "type": "number",
            "description": "Related Items line of the one-time budget (the related Technology Items). The template's oneTimeBudget is the sum of the three lines and cannot be set directly.",
            "format": "double",
            "nullable": true
          },
          "laborBudget": {
            "type": "number",
            "description": "Labor line of the one-time budget.",
            "format": "double",
            "nullable": true
          },
          "partsBudget": {
            "type": "number",
            "description": "Parts line of the one-time budget.",
            "format": "double",
            "nullable": true
          },
          "recurringBudget": {
            "type": "number",
            "description": "Recurring budget of the template.",
            "format": "double",
            "nullable": true
          },
          "recurringPeriod": {
            "type": "integer",
            "description": "Number of periods the recurring budget covers.",
            "format": "int32",
            "nullable": true
          },
          "recurringTotal": {
            "type": "number",
            "description": "Total of the recurring budget over its periods.",
            "format": "double",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity recorded on the template.",
            "format": "int32",
            "nullable": true
          },
          "month": {
            "maximum": 12,
            "minimum": 1,
            "type": "integer",
            "description": "Budget month of the template (1-12).",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Budget year of the template.",
            "format": "int32",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Effective date of the template (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "cancellationDate": {
            "type": "string",
            "description": "Cancellation date of the template (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "tagsIds": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Tags to assign to the template (see listInitiativeTags). Max 50.",
            "nullable": true
          },
          "groupId": {
            "type": "integer",
            "description": "Template group to create the template in: a group id off a template's group in listInitiativeTemplates. Null, 0 or omitted creates an ungrouped template. A group of another client, or an id that matches no group, is notFound and nothing is created.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of createInitiativeTemplate: one template of the caller's client's initiative template library, appended at\nthe end of its group, or of the ungrouped templates when no group is named. It carries the fields of an\ninitiative item create without the site, assignee, status and custom column values, which a template has no\ncounterpart for. The name is trimmed and unique within the client, compared case-insensitively. The position is\ndecided by the server, oneTimeBudget is derived from the three budget lines, and the long-form HTML content is\nwritten through updateInitiativeTemplateContent afterwards."
      },
      "InitiativeTemplateGroupRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the template group (filter listInitiativeTemplates with groupId).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the template group.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The template group an initiative template belongs to, in the caller's client's initiative template library.\nGroups have no operations of their own: read the id here, filter the template list with groupId and create a\ntemplate in the group with groupId."
      },
      "InitiativeTemplateResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the initiative template. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the initiative template.",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "description": "Short summary of the template.",
            "nullable": true
          },
          "nextSteps": {
            "type": "string",
            "description": "Next steps recorded on the template.",
            "nullable": true
          },
          "priority": {
            "$ref": "#/components/schemas/InitiativeItemPriorityRef"
          },
          "budgetEstimate": {
            "type": "string",
            "description": "Free-text budget range, for example \"$5k-$10k\".",
            "nullable": true
          },
          "itemsBudget": {
            "type": "number",
            "description": "Related Items line of the one-time budget (the related Technology Items).",
            "format": "double",
            "nullable": true
          },
          "laborBudget": {
            "type": "number",
            "description": "Labor line of the one-time budget.",
            "format": "double",
            "nullable": true
          },
          "partsBudget": {
            "type": "number",
            "description": "Parts line of the one-time budget.",
            "format": "double",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "number",
            "description": "One-time budget of the template — the sum of itemsBudget, laborBudget and partsBudget. Read-only: write the three lines instead.",
            "format": "double",
            "nullable": true
          },
          "recurringBudget": {
            "type": "number",
            "description": "Recurring budget of the template.",
            "format": "double",
            "nullable": true
          },
          "recurringPeriod": {
            "type": "integer",
            "description": "Number of periods the recurring budget covers.",
            "format": "int32",
            "nullable": true
          },
          "recurringTotal": {
            "type": "number",
            "description": "Total of the recurring budget over its periods.",
            "format": "double",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity recorded on the template.",
            "format": "int32",
            "nullable": true
          },
          "month": {
            "type": "integer",
            "description": "Budget month of the template (1-12), or null.",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Budget year of the template, or null.",
            "format": "int32",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Effective date of the template (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "cancellationDate": {
            "type": "string",
            "description": "Cancellation date of the template (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeItemTagRef"
            },
            "description": "Tags assigned to the template (id + name + colour; filter with tagId, see listInitiativeTags).",
            "nullable": true
          },
          "group": {
            "$ref": "#/components/schemas/InitiativeTemplateGroupRef"
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the template inside its group, or inside the ungrouped templates. Read-only.",
            "format": "double",
            "nullable": true
          },
          "contentLength": {
            "type": "integer",
            "description": "Length in characters of the template's HTML content. The content itself is not on this resource: read it with getInitiativeTemplateContent.",
            "format": "int32",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "When the template was created (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "description": "When the template was last updated (UTC); absent on a template never edited since creation.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One template of the caller's client's initiative template library: the content and budget fields an initiative\nitem created from it starts with. Templates are created, edited and deleted here (createInitiativeTemplate,\npatchInitiativeTemplate, deleteInitiativeTemplate), which answer this shape too; they are reordered, moved\nbetween groups and applied to items in the application only. The template's long-form HTML content is never on\nthis resource: it travels only through getInitiativeTemplateContent and updateInitiativeTemplateContent;\ncontentLength says how large it is. Fields are omitted from the JSON when their value is null."
      },
      "InitiativeTemplateResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeTemplateResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "InitiativeTemplateResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InitiativeTemplateResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "IntegrationEntityConnectionResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the connection row. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "ourEntityId": {
            "type": "string",
            "description": "Strategy Overview id of the mapped entity, as a string. For entityType=Company it is the company id from listCompanies. Null when the row is not currently mapped: either imported and never mapped, or unmapped since (including manually). A non-null value only proves the row exists; only a row with status mapped is a live link.",
            "nullable": true
          },
          "integratedSystemEntityId": {
            "type": "string",
            "description": "Id of the record in the integrated system. For a ConnectWise company this is the integer company id (the record id, not the string identifier).",
            "nullable": true
          },
          "entityType": {
            "enum": [
              "company"
            ],
            "type": "string",
            "description": "Entity type of the mapping.",
            "nullable": true
          },
          "status": {
            "enum": [
              "linked",
              "mapped",
              "unMapped",
              "synced",
              "ourEntityWhereDeleted",
              "integratedSystemEntityWhereDeleted",
              "orphan",
              "wasMapped"
            ],
            "type": "string",
            "description": "Stored connection status (linked, mapped, unMapped, synced, ...), as the integration left it. Only mapped is a live link; an unMapped row may still carry both ids, for example after the company was deleted in the integrated system.",
            "nullable": true
          },
          "lastSyncDate": {
            "type": "string",
            "description": "Last sync of this connection (UTC), if any.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A stored mapping row of one integration: a Strategy Overview entity paired with its record in the\nintegrated system. Fields are omitted from the JSON when not selected via the fields/view parameters\n(only requested fields are returned; id is always present)."
      },
      "IntegrationEntityConnectionResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationEntityConnectionResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "IntegrationResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the integration. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the integration.",
            "nullable": true
          },
          "type": {
            "enum": [
              "connectWise",
              "autotask",
              "kaseya",
              "syncro",
              "atera",
              "ninjaOne",
              "haloPSA",
              "pulseway",
              "serviceNow",
              "warranty",
              "liongard",
              "brightgauge",
              "office365",
              "itGluePSA",
              "huduData",
              "itBoost",
              "saaslio",
              "calendly",
              "timezest",
              "bookings",
              "simplesat",
              "smileback",
              "customerThermometer",
              "connectbooster",
              "wiseSync",
              "itGlueData",
              "ninjaOneData",
              "dattoRMMData"
            ],
            "type": "string",
            "description": "Integrated system (ConnectWise, Autotask, HaloPSA, ...).",
            "nullable": true
          },
          "status": {
            "enum": [
              "inActive",
              "active"
            ],
            "type": "string",
            "description": "Stored status of the integration (active or inactive), as configured; the subscription state is not folded in.",
            "nullable": true
          },
          "lastSyncDate": {
            "type": "string",
            "description": "The integration's last sync run, scheduled or manual (UTC), set even when the run failed; null when it never ran.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An integration of the caller's client. Fields are omitted from the JSON when not selected\nvia the fields/view parameters (only requested fields are returned; id is always present).\nConnection details, keys and URLs are never part of it."
      },
      "IntegrationResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "IntegrationResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IntegrationResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "JsonPatchDocument": {
        "type": "array",
        "items": {
          "required": [
            "op",
            "path"
          ],
          "type": "object",
          "properties": {
            "op": {
              "type": "string",
              "description": "Operation to perform: add, remove, replace, move, copy or test."
            },
            "path": {
              "type": "string",
              "description": "JSON Pointer to the target member, spelled exactly as THIS operation's own description documents its patchable paths — the casing differs per operation, so never carry a path from one operation to another."
            },
            "value": {
              "description": "New value for add, replace and test. Any JSON type: string, number, boolean, array, object or null."
            },
            "from": {
              "type": "string",
              "description": "Source JSON Pointer. Required by move and copy, unused otherwise."
            }
          }
        },
        "description": "RFC 6902 JSON Patch document: an array of operations applied in order."
      },
      "LinkGoalInput": {
        "required": [
          "client",
          "goal"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name, exact (case aside); a partial name or several matching clients return disambiguation candidates and link nothing."
          },
          "goal": {
            "minLength": 1,
            "type": "string",
            "description": "The goal's name, among that client's goals only, exact (case aside); a partial name, or several goals of that name, return disambiguation candidates and link nothing."
          },
          "initiatives": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Initiative item names of the client, exact (case aside), each linked to the goal.",
            "nullable": true
          },
          "plans": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Plan names of the client, exact (case aside), each linked to the goal whole; linking a plan drops the goal's direct links to its rows.",
            "nullable": true
          },
          "planItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalLinkPlanItemInput"
            },
            "description": "Plan rows, each a plan name and the name of a row in that plan's first part, linked to the goal directly; a row whose plan is linked whole is refused.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of link_goal: which goal of which client to link to which initiatives, plans and plan rows, all by name. At\nleast one of initiatives, plans and planItems must hold a name."
      },
      "LinkGoalResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next.",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "goal": {
            "$ref": "#/components/schemas/GoalRowResource"
          },
          "written": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiLinkRowResource"
            },
            "description": "The records linked (or unlinked by unlink_goal): initiatives, then plans, then plan rows, each in the order asked. On link_goal a record that was already linked is listed here too.",
            "nullable": true
          },
          "refused": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiLinkRowResource"
            },
            "description": "The records not linked (or not unlinked by unlink_goal), each with the reason in message: a plan row already covered by a linked plan, or, with one message, every record of a step refused whole, e.g. while another write held the goal or a plan (read the goal with query_goals, then retry those).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of link_goal and unlink_goal: either disambiguation (nothing was written) or the scope, the goal as it reads\nafter the writes, and one row per record written and per record refused."
      },
      "LinkGoalResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LinkGoalResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "LinkInitiativeItemInput": {
        "required": [
          "client",
          "item"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name, exact (case aside); a partial name or several matching clients return disambiguation candidates and link nothing."
          },
          "item": {
            "minLength": 1,
            "type": "string",
            "description": "The initiative item's name, among that client's items only, exact (case aside); a partial name, or several items of that name, return disambiguation candidates and link nothing."
          },
          "goals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Goal names of the client, exact (case aside), each linked to the item.",
            "nullable": true
          },
          "technologyItems": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Technology item names of the client, exact (case aside), each linked to the item; a technology item already linked to another initiative item is refused (unlink it there first).",
            "nullable": true
          },
          "technologyGroup": {
            "type": "string",
            "description": "Technology group name, exact (case aside): technologyItems are looked up in that group only, e.g. when one name is in two groups.",
            "nullable": true
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Assessment item names (findings) on the client's report that report picks, exact (case aside), each linked to the item; only a draft report's findings can be linked.",
            "nullable": true
          },
          "template": {
            "type": "string",
            "description": "Report template name: findings are read from that template's reports only. Same name rules as client.",
            "nullable": true
          },
          "group": {
            "type": "string",
            "description": "Assessment group name: picks the copy of a finding that sits on the report more than once (without it such a finding answers disambiguation candidates on group and links nothing). Same name rules as client.",
            "nullable": true
          },
          "report": {
            "enum": [
              "latest",
              "latestDraft",
              "latestCompleted"
            ],
            "type": "string",
            "description": "Which report of the client findings are read from: latestDraft (default) = the newest draft; latest = the newest report; latestCompleted = the newest completed report. Only a draft report's findings can be linked; archived reports are never read."
          }
        },
        "additionalProperties": false,
        "description": "Body of link_initiative_item: which initiative item of which client to link to which goals, technology items and\nassessment findings, all by name. At least one of goals, technologyItems and findings must hold a name."
      },
      "LinkInitiativeItemResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next.",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "initiative": {
            "$ref": "#/components/schemas/InitiativeRowResource"
          },
          "written": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiLinkRowResource"
            },
            "description": "The records linked (or unlinked by unlink_initiative_item): goals, then technology items, then findings, each in the order asked. On link_initiative_item a record that was already linked is listed here too.",
            "nullable": true
          },
          "refused": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiLinkRowResource"
            },
            "description": "The records not linked (or not unlinked by unlink_initiative_item), each with the reason in message: a technology item linked to another initiative item; a goal is written one at a time, so a goal refused, e.g. while another write held it, is refused alone; the technology items or the findings refused whole, e.g. while another write held the item or a report, are each listed with that one message (call again with those: an existing link is kept).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of link_initiative_item and unlink_initiative_item: either disambiguation (nothing was written) or the\nscope, the initiative item as it reads after the writes, and one row per record written and per record refused."
      },
      "LinkInitiativeItemResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LinkInitiativeItemResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "LinkProjectInput": {
        "required": [
          "client",
          "project"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name, exact (case aside); a partial name or several matching clients return disambiguation candidates and link nothing."
          },
          "project": {
            "minLength": 1,
            "type": "string",
            "description": "The project's name as the PSA sends it, among that client's projects only, exact (case aside); a partial name, or several projects of that name, return disambiguation candidates and link nothing. Only a project still synced from the PSA can gain links."
          },
          "initiatives": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Initiative item names of the client, exact (case aside), each linked to the project.",
            "nullable": true
          },
          "planItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectLinkPlanItemInput"
            },
            "description": "Plan rows, each a plan name and the name of a row in that plan's first part, linked to the project.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of link_project: which project of which client to link to which initiatives and plan rows, all by name. At least\none of initiatives and planItems must hold a name."
      },
      "LinkProjectResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next.",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "project": {
            "$ref": "#/components/schemas/ProjectRowResource"
          },
          "written": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiLinkRowResource"
            },
            "description": "The records linked (or unlinked by unlink_project): initiatives, then plan rows, each in the order asked. On link_project a record that was already linked is listed here too.",
            "nullable": true
          },
          "refused": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiLinkRowResource"
            },
            "description": "The records not linked (or not unlinked by unlink_project), each with the reason in message: a record the link refuses, or, with one message, every record of a step refused whole, e.g. while another write held the project or a plan (read the project with query_projects, then retry those).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of link_project and unlink_project: either disambiguation (nothing was written) or the scope, the project\nas it reads after the writes, and one row per record written and per record refused."
      },
      "LinkProjectResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LinkProjectResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "M365ClientPostureResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name; omitted on the totals.",
            "nullable": true
          },
          "users": {
            "type": "integer",
            "description": "Matching users.",
            "format": "int32"
          },
          "admins": {
            "type": "integer",
            "description": "Admins: reported admin, or holding at least one directory role.",
            "format": "int32"
          },
          "adminsWithoutMfa": {
            "type": "integer",
            "description": "Admins not registered for MFA.",
            "format": "int32"
          },
          "withoutMfa": {
            "type": "integer",
            "description": "Users known not to be registered for MFA.",
            "format": "int32"
          },
          "mfaUnknown": {
            "type": "integer",
            "description": "Users whose MFA state the tenant does not report; never counted as without MFA.",
            "format": "int32"
          },
          "guests": {
            "type": "integer",
            "description": "Guest users.",
            "format": "int32"
          },
          "unlicensed": {
            "type": "integer",
            "description": "Users marked Unlicensed (no assigned licence); a user whose licence names were not resolved is not counted here.",
            "format": "int32"
          },
          "staleSignIn": {
            "type": "integer",
            "description": "Users whose last sign-in is known and older than noSignInDays (default 90 days).",
            "format": "int32"
          },
          "signInUnknown": {
            "type": "integer",
            "description": "Users with no reported last sign-in (never signed in cannot be told apart from not reported); never counted as stale.",
            "format": "int32"
          },
          "dataAsOf": {
            "type": "string",
            "description": "When the client's Microsoft 365 data was last synced (UTC); on the totals, the oldest known sync among the clients counted (clientsWithoutSyncDate counts the clients without one).",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One client's Microsoft 365 user counts over the users the request matches (live members and guests;\nblocked accounts only when asked). An unknown MFA state or last sign-in is counted in mfaUnknown or\nsignInUnknown, never as without MFA or as stale."
      },
      "M365UserRowResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "description": "The user's display name.",
            "nullable": true
          },
          "principalName": {
            "type": "string",
            "description": "The user's sign-in name (user principal name).",
            "nullable": true
          },
          "licenses": {
            "type": "string",
            "description": "The user's licences, comma-separated; \"Unlicensed\" when none.",
            "nullable": true
          },
          "mfa": {
            "type": "string",
            "description": "MFA state: registered, not registered, or unknown (the tenant does not report it).",
            "nullable": true
          },
          "isAdmin": {
            "type": "boolean",
            "description": "Whether the user is an admin: reported admin, or holding a directory role."
          },
          "lastSignIn": {
            "type": "string",
            "description": "Last successful sign-in (UTC); omitted when not reported.",
            "format": "date-time",
            "nullable": true
          },
          "userType": {
            "type": "string",
            "description": "Member or Guest.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One synced Microsoft 365 user."
      },
      "PageInfo": {
        "required": [
          "page",
          "pageSize",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "description": "1-based page number of this response.",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "description": "Number of items requested per page.",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "description": "Total number of items matching the query across all pages.",
            "format": "int64"
          },
          "hasMore": {
            "type": "boolean",
            "description": "True when more pages exist after this one.",
            "readOnly": true
          },
          "nextPage": {
            "type": "integer",
            "description": "The next page number, or null when this is the last page.",
            "format": "int32",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Paging metadata returned with every external list response."
      },
      "PlanBudgetTotalsResource": {
        "type": "object",
        "properties": {
          "oneTimeBudget": {
            "type": "number",
            "description": "The sum of their one-time budgets.",
            "format": "double"
          },
          "recurringTotal": {
            "type": "number",
            "description": "The sum of their recurring totals, as entered.",
            "format": "double"
          },
          "items": {
            "type": "integer",
            "description": "Matching items, whatever the page.",
            "format": "int32"
          },
          "plans": {
            "type": "integer",
            "description": "The plans the matching items are on.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "The matched plan items, the plans they are on and the sums of their budgets."
      },
      "PlanColumnInput": {
        "required": [
          "label"
        ],
        "type": "object",
        "properties": {
          "label": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Display label of the column. Required, at most 50 characters."
          },
          "description": {
            "type": "string",
            "description": "Description of the column. Optional, and shown only inside the product.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "customAppField",
              "customIntegrationField",
              "name",
              "status",
              "user",
              "startDate",
              "dueDate",
              "oneTimeBudget",
              "year",
              "month",
              "quantity",
              "recurringTotal",
              "effectiveDate",
              "cancellationDate",
              "image",
              "period",
              "site"
            ],
            "type": "string",
            "description": "Type of the column, which decides what its values mean. Required. A part holds at most ONE column of each type except customAppField, so a second status, name, user, startDate, dueDate, oneTimeBudget, year, month, quantity, recurringTotal, effectiveDate, cancellationDate, period or site column in the same part is rejected with 400. customIntegrationField, image and undefined are never creatable."
          },
          "customTypeEnum": {
            "enum": [
              "singleSelectDropDown",
              "text",
              "date",
              "user",
              "checkbox",
              "link",
              "image",
              "number",
              "html",
              "age",
              "smartMemory",
              "smartOS",
              "class"
            ],
            "type": "string",
            "description": "Kind of custom column, required with typeEnum customAppField and rejected with any other type. singleSelectDropDown, text, date, user, checkbox and link are creatable; number, image, html, class, age, smartMemory, smartOS and undefined are rejected with 400.",
            "nullable": true
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanColumnOptionInput"
            },
            "description": "Allowed values of a dropdown-backed column, in the order they should be shown. REQUIRED with typeEnum status and with customTypeEnum singleSelectDropDown — at least one option — and rejected on every other type. Each option's id is generated by the server and is what an item's value in the column holds, so read the created column's options back to learn them.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Create body for a column of a plan part OR of a plan-TEMPLATE part — createPlanColumn and\ncreatePlanTemplateColumn take the same shape and run the same validation, since both describe\nPlanPartColumnTypeEnum columns through the same shared core. label and typeEnum are required;\neverything else the column carries is decided by the server — sortOrder (the column is appended), the\nUI style string, and the per-view display settings, none of which this surface publishes.\n\nWhich types may be created is narrower than the enum: a part already holding a column of a core type\nrefuses a second one, and the types whose values no external operation can produce or consume are\nrefused outright. The one settings surface is External.API.Models.Plans.PlanColumnInput.Options, and only a dropdown-backed\ncolumn has it."
      },
      "PlanColumnOption": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the option. This is the value an item holds in the column, and the value an item patch writes to it.",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "Display label of the option.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the option as the product UI shows it, for example #0085ff. Null when the option carries none.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this option is the column's default: the value stamped into an item that holds none."
          }
        },
        "additionalProperties": false,
        "description": "One allowed value of a dropdown-backed column — a plan column or a plan-template one, which publish the\nsame shape but never the same ids — such as a Status column. The id is what an\nitem's value in that column holds, so this is where a legal value for the column comes from.\nEvery field the write shape External.API.Models.Plans.PlanColumnOptionInput accepts is published here, so an option\nlist can be read back, edited and resent without the caller having to remember what it wrote."
      },
      "PlanColumnOptionInput": {
        "required": [
          "label"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of an EXISTING option of this column, to keep it and the item values that hold it. Label is always REPLACED by what this entry sends. color and isDefault are MERGED onto the stored option: omit either and it is KEPT as stored; send color as an empty string to clear it; send isDefault explicitly (true or false) to set it. What the id also preserves, beyond what this write shape can express, is the internal fields (a Status option's completion flags). Omit the id to add a new option: it is generated by the server, never chosen by the caller — a new option has nothing stored to fall back to, so an omitted color stays unset and an omitted isDefault stays false. A create refuses any id, and a patch refuses one this column does not currently have.",
            "nullable": true
          },
          "label": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Display label of the option. Required, at most 50 characters."
          },
          "color": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Colour of the option as the product UI shows it, for example #0085ff. At most 50 characters. Optional: omitted on an EXISTING option (one carrying an id), it keeps the stored colour; an empty string clears it; a new option with no color stays without one.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this option is the column's default. At most one option may be the default — evaluated on the MERGED result, so an existing option that keeps its stored default by omission still counts toward the limit. Creating a column with a default option immediately stamps that option on every item of the part that already holds any value. Optional: omitted on an EXISTING option, it keeps the stored flag; explicit true or false sets it; a new option with it omitted is not the default.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One allowed value of a dropdown-backed column, as the plan writes (createPlanColumn, patchPlanColumn)\nand the plan-TEMPLATE writes (createPlanTemplateColumn, patchPlanTemplateColumn) all take it.\nThis is the WRITE shape; the read shape is External.API.Models.Plans.PlanColumnOption, which publishes every field\nof it, so an option list reads back exactly as it was written.\n\nThe id is server-minted, and every one of those operations enforces that: a CREATE refuses an id, and a\npatch's /options accepts one only when it is a current option id of that column — which is what\nKEEPS that option, and with it every item value already holding the id."
      },
      "PlanColumnResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the column. Match it against an item's columns[].columnId to read that item's values.",
            "format": "int32",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "Display label of the column.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the column, or null. Shown only inside the product; createPlanColumn and patchPlanColumn /description write it.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "customAppField",
              "customIntegrationField",
              "name",
              "status",
              "user",
              "startDate",
              "dueDate",
              "oneTimeBudget",
              "year",
              "month",
              "quantity",
              "recurringTotal",
              "effectiveDate",
              "cancellationDate",
              "image",
              "period",
              "site"
            ],
            "type": "string",
            "description": "Type of the column. Determines what its values mean and whether they can be written.",
            "nullable": true
          },
          "customTypeEnum": {
            "enum": [
              "undefined",
              "singleSelectDropDown",
              "text",
              "date",
              "user",
              "checkbox",
              "link",
              "image",
              "number",
              "html",
              "age",
              "smartMemory",
              "smartOS",
              "class"
            ],
            "type": "string",
            "description": "Kind of custom column on a customAppField column — text, date, user, checkbox, link, singleSelectDropDown and the internal-only kinds — and null on every built-in type.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the column is active.",
            "nullable": true
          },
          "isRecurring": {
            "type": "boolean",
            "description": "Whether the column is recurring.",
            "nullable": true
          },
          "isExcel": {
            "type": "boolean",
            "description": "Whether the column is backed by Excel data.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the column within the part.",
            "format": "double",
            "nullable": true
          },
          "planTemplatePartColumnId": {
            "type": "integer",
            "description": "Id of the template part column this column was created from, or null.",
            "format": "int32",
            "nullable": true
          },
          "isEditable": {
            "type": "boolean",
            "description": "Whether a plan-item patch may write this column's values for an item. This is about item VALUES — editing the COLUMN itself is patchPlanColumn, which this flag says nothing about. A column whose isEditable is false is 400 on both patchPlanItem and createPlanItem's columns map.",
            "nullable": true
          },
          "patchPath": {
            "type": "string",
            "description": "The item-patch JSON Patch path that writes this column, for example /columns/17. Absent when isEditable is false. patchPlanItem takes this exact path, and createPlanItem's columns map is keyed by the same column id.",
            "nullable": true
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanColumnOption"
            },
            "description": "The allowed values of a dropdown-backed column, such as a Status column: an item's value in the column is one of these option ids. Absent for a column that is not dropdown-backed.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A column of a plan part. Returned by listPlanColumns, scoped to the plan and part in the route.\nUI-only column settings and view settings are not exposed externally."
      },
      "PlanColumnResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanColumnResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "PlanColumnResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlanColumnResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "PlanCompanyRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the company (see listCompanies).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the company.",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/PlanCompanyStatusRef"
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanRelatedRef"
            },
            "description": "Groups (territories) the company belongs to (id + name). Only present in the Full view.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The company a plan belongs to. Carries id + name in every view; the nested status flags and the\ngroups collection are populated only in the Full view (view=Full), per the shared related-entity\nrule. Use the id with the companyId filter or listCompanies / getCompany."
      },
      "PlanCompanyStatusRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the status (see listCompanyStatuses).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the status.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the client's default status. Only present in the Full view.",
            "nullable": true
          },
          "isHideCompanies": {
            "type": "boolean",
            "description": "Whether companies with this status are hidden. Only present in the Full view.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The status of the company a plan belongs to. Carries id + name in every view; the extra flags\nare populated only in the Full view (view=Full) so default responses stay lean."
      },
      "PlanCountLineResource": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The status label, the quarter (\"2026-Q1\", or \"unscheduled\" for no month, no year or a year outside 1900-2200) or the client name; \"(none)\" is the status line of the items with no status.",
            "nullable": true
          },
          "count": {
            "type": "integer",
            "description": "Matching items in the group.",
            "format": "int32"
          },
          "oneTimeBudget": {
            "type": "number",
            "description": "The sum of their one-time budgets (a blank or non-numeric value adds nothing).",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One group of the matched plan items: a status label, a calendar quarter or a client."
      },
      "PlanDeletedByRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the user who deleted the plan. A string GUID (see getUser). Kept even when the account is gone — only firstName/lastName go null in that case.",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "description": "First name of the user who deleted the plan.",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the user who deleted the plan.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The user who moved a plan to the trash. A separate model from PlanOwnerRef because it has no\ndenormalized-name fallback to fall back ON: the plan stores only the deleting user's id, with no\nFirstName/LastName snapshot, so FirstName and LastName are null once that account is gone — but Id is\nthe raw stored value and survives the account, since Plan.DeletedByUserId carries no foreign key."
      },
      "PlanInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Display name of the plan. Required, at most 50 characters."
          },
          "companyId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Identifier of the company the plan belongs to (listCompanies). Required. A company you cannot see is reported as not found.",
            "format": "int32"
          },
          "templateId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Optional identifier of a plan template to build the plan FROM (a plan's template object, or createPlanTemplate). A template you cannot access is reported as not found. Omitted creates a blank plan seeded with the default parts.",
            "format": "int32",
            "nullable": true
          },
          "icon": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Icon of the plan. At most 50 characters. Omitted leaves it unset, or inherits the template's icon on a from-template create.",
            "nullable": true
          },
          "color": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Colour of the plan. At most 50 characters. Omitted leaves it unset, or inherits the template's colour on a from-template create.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Create body for a plan. Two shapes ride on the same operation: with no templateId the plan is created\nblank (which still means seeded with the default part scaffolding), with a templateId its parts,\ncolumns and items are copied FROM that template.\n            \nNeither the tenant nor the per-user assignment list is part of the body: the client comes from the\ncaller's token, and the assignments are managed internally — a plan created here is reachable by the\ncompany's Managers and by the caller, and nothing in this body widens that."
      },
      "PlanItemColumnValueInput": {
        "type": "object",
        "properties": {
          "value": {
            "description": "The value to store. Its type follows the column's typeEnum: text for Name and CustomAppField, a UTC date for the date columns, a number for OneTimeBudget, Year, Month and Quantity, a user id for User, and one of the column's own option ids (see listPlanColumns options) for Status. Those four numeric types are STORED AS TEXT, so a number written here reads back as a JSON string: send 42.5 and the item returns \"42.5\". Compare such a value as text, or parse it first.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of this value within the column. Leave at 0 for a single-valued column.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One value written into a plan item's column by createPlanItem or by patchPlanItem's\n/columns/{columnId} path. Mirrors the shared internal column-value shape, so the operation's value\ncopies straight through to the core once it has been typed.\n\nWriting and reading are not symmetric for the numeric column types. OneTimeBudget, Year, Month and\nQuantity accept a number but are STORED as text, so the value comes back out of getPlanItem /\nlistPlanItems as a JSON string."
      },
      "PlanItemColumnValues": {
        "type": "object",
        "properties": {
          "columnId": {
            "type": "integer",
            "description": "Id of the column these values belong to (see listPlanColumns).",
            "format": "int32",
            "nullable": true
          },
          "values": {
            "type": "array",
            "items": { },
            "description": "The values held in that column, as typed scalars (string, number, boolean or UTC date). Most columns hold a single value.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The values a plan item holds in one of its part's columns. Match columnId against listPlanColumns\nto learn the column's type and whether it is writable."
      },
      "PlanItemInput": {
        "type": "object",
        "properties": {
          "parentId": {
            "type": "integer",
            "description": "Id of the item to nest this one under. Must be an item of the SAME part; an item of another part or plan is reported as not found. Omit to create the item at the top level.",
            "format": "int32",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the item is active. Defaults to true when omitted.",
            "nullable": true
          },
          "columns": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PlanItemColumnValueInput"
              },
              "nullable": true
            },
            "description": "Values to write into the new item's columns, keyed by column id. Only columns whose isEditable is true on listPlanColumns may be named: a read-only column is rejected with 400 and a column of another part with 404, and nothing is written either way.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The body createPlanItem takes. Every field is optional: a body of {} creates an active item at the end\nof the part.\n\nThere is no name field and no typeEnum. The item's displayed name is its value in the part's Name-type\ncolumn, so it is written through External.API.Models.Plans.PlanItemInput.Columns; the type is always Item, and sortOrder is\nassigned by the server (the new item is appended) — patchPlanItem /sortOrder moves it afterwards, and\npatchPlanItem /description gives it a description."
      },
      "PlanItemResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the item.",
            "format": "int32",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "item",
              "midItem",
              "group"
            ],
            "type": "string",
            "description": "Type of the item. Read-only.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the item is active.",
            "nullable": true
          },
          "isCollapsed": {
            "type": "boolean",
            "description": "Whether the item is collapsed in the UI.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the item within its part.",
            "format": "double",
            "nullable": true
          },
          "parentId": {
            "type": "integer",
            "description": "Id of the item this one is nested under, or null for a root item of the part. Every item of the page shares one part, so a flat listPlanItems page plus this field is the whole tree. Write it with patchPlanItem's /parentId path.",
            "format": "int32",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the item. Absent in the Summary view of listPlanItems and listReportPlanItems; always present in the Full view and in the single-item reads.",
            "nullable": true
          },
          "descriptionLength": {
            "type": "integer",
            "description": "Character count of the stored description, or null when the item has none. Present in every view, so a Summary row still says whether a description exists and how big it is before you fetch it.",
            "format": "int32",
            "nullable": true
          },
          "planTemplatePartItemId": {
            "type": "integer",
            "description": "Id of the template part item this item was created from, or null. Read-only.",
            "format": "int32",
            "nullable": true
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanItemColumnValues"
            },
            "description": "The item's values, grouped by column. A column the item holds no value in is absent. Empty when the item holds no values at all.",
            "nullable": true
          },
          "goals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanRelatedRef"
            },
            "description": "Goals linked to this item directly (id + name, in goal order; filter listPlanItems with goalId, see listGoals); [] when it has none. A goal linked to the item's whole plan is not repeated here — read it off getPlan. Present on listPlanItems (Full view) and getPlanItem for a role that reads goals; never on the write echoes or on the report-plan reads.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single item of a plan part. Returned by getPlanItem and patchPlanItem. The writable fields\n(isActive, isCollapsed, sortOrder, description, parentId) round-trip through patchPlanItem; typeEnum,\nplanTemplatePartItemId and descriptionLength are read-only. The item's displayed name is not a field of\nits own — it is the value the item holds in the part's Name-type column, so read it out of\nExternal.API.Models.Plans.PlanItemResource.Columns.\n\nPlan items are a TREE: External.API.Models.Plans.PlanItemResource.ParentId is what makes the flat page listPlanItems returns\nreconstructable, and patchPlanItem's /parentId path is what moves an item inside it."
      },
      "PlanItemResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanItemResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "PlanItemResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlanItemResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "PlanItemRowResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The item id. Stable; pass it as itemId or parentId.",
            "format": "int32",
            "nullable": true
          },
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "plan": {
            "type": "string",
            "description": "Plan name.",
            "nullable": true
          },
          "part": {
            "type": "string",
            "description": "Label of the part (section) the item is in.",
            "nullable": true
          },
          "parentId": {
            "type": "integer",
            "description": "Id of the row the item is nested under; omitted at the top level of its part.",
            "format": "int32",
            "nullable": true
          },
          "path": {
            "type": "string",
            "description": "Names of the rows above the item, from the top, joined with \" > \" (for example 2027 > Q4); omitted at the top level. A row above with no name is shown as (none). A path over 300 characters keeps only its end, the rows nearest the item, from a whole row name on, after a leading \"… > \" (a single name longer than that keeps only its end).",
            "nullable": true
          },
          "position": {
            "type": "integer",
            "description": "1-based place of the item among the rows under the same parent.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Item name (the plan's Name column).",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label on the item's plan; omitted when the item has none.",
            "nullable": true
          },
          "month": {
            "type": "integer",
            "description": "The Month column, 1-12.",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "The Year column.",
            "format": "int32",
            "nullable": true
          },
          "quarter": {
            "type": "string",
            "description": "Calendar quarter of the month, Q1 to Q4, or unscheduled when the month or the year is not set or the year is outside 1900-2200 (year keeps the raw value).",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "number",
            "description": "One-time budget; omitted when blank or not a number.",
            "format": "double",
            "nullable": true
          },
          "recurringTotal": {
            "type": "number",
            "description": "Recurring total; omitted when blank or not a number.",
            "format": "double",
            "nullable": true
          },
          "owner": {
            "type": "string",
            "description": "The plan owner's full name (a deleted user's name as it was).",
            "nullable": true
          },
          "assignee": {
            "type": "string",
            "description": "Full name of the user in the part's User column, several users joined with \", \"; omitted when there is none. It can name an inactive user, or several, while the assignee of update_plan_item and create_plan_item is one active user.",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "The item's notes (its description, HTML) as stored, only with includeNotes; cut when notesTruncated is true: to 1,000 characters on a page; with itemId a note is read up to 100,000 characters. Omitted when the item has none.",
            "nullable": true
          },
          "notesLength": {
            "type": "integer",
            "description": "Stored length of the notes in characters, trailing spaces not counted, also when they are cut; only with includeNotes.",
            "format": "int32",
            "nullable": true
          },
          "notesTruncated": {
            "type": "boolean",
            "description": "true when notes is cut; omitted otherwise.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One plan item: its id and place in the plan, the rest by names."
      },
      "PlanItemsBulkPatchInput": {
        "required": [
          "itemIds"
        ],
        "type": "object",
        "properties": {
          "itemIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of the items to patch. Required and non-empty — an empty list is rejected, never read as 'all items in the part'. Capped per request. An id that is not an item of this part is reported in the response's errors; the items that do exist are still updated."
          },
          "patch": {
            "type": "array",
            "items": {
              "required": [
                "op",
                "path"
              ],
              "type": "object",
              "properties": {
                "op": {
                  "type": "string",
                  "description": "Operation to perform: add, remove, replace, move, copy or test."
                },
                "path": {
                  "type": "string",
                  "description": "JSON Pointer to the target member, spelled exactly as THIS operation's own description documents its patchable paths — the casing differs per operation, so never carry a path from one operation to another."
                },
                "value": {
                  "description": "New value for add, replace and test. Any JSON type: string, number, boolean, array, object or null."
                },
                "from": {
                  "type": "string",
                  "description": "Source JSON Pointer. Required by move and copy, unused otherwise."
                }
              }
            },
            "description": "The RFC 6902 operation array to apply to every listed item. /columns/{columnId} ONLY — the scalar paths the single-item patch accepts (/isActive, /isCollapsed, /sortOrder, /description, /parentId) are NOT bulk-writable, and naming one is 400 with nothing written. remove on a column clears it for every listed item. On the plan-template surface a value written here is always isDefault false — the underlying seam has no isDefault field."
          }
        },
        "additionalProperties": false,
        "description": "Bulk patch request: apply ONE JSON Patch to several items of a plan part or of a plan-template part,\ntargeted by an explicit id list. The wrapper is application/json; External.API.Models.Plans.PlanItemsBulkPatchInput.Patch is the raw RFC\n6902 operation array, bound as a JsonElement because System.Text.Json cannot materialize a\nJsonPatchDocument — the controller service converts it, into the value shape ITS surface takes.\n\nThere is deliberately no filter-based targeting: an agent has no grid in front of it, and an empty\nfilter result or one matching more rows than assumed would both turn into a silent mass mutation.\nRequiring explicit ids keeps the blast radius visible in the request itself."
      },
      "PlanItemsBulkPatchItemError": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the item that failed.",
            "format": "int32"
          },
          "code": {
            "enum": [
              "validationFailed",
              "notFound",
              "accessDenied",
              "internalError",
              "idempotencyKeyReused",
              "requestInProgress",
              "unauthenticated",
              "notImplemented",
              "rateLimited"
            ],
            "type": "string",
            "description": "Stable, documented error codes for the external API. Values are CONTRACT once shipped\n(rename = breaking change). New values are added as real cases appear; every addition must\nland in the External API Guide's error-code catalog in the same change."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation of the failure.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One per-item failure in a bulk plan-item patch: the item id, a machine-readable code (the shared\nExternalErrorCode, so it matches the single-resource error contract) and a human-readable message."
      },
      "PlanItemsBulkPatchResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanItemResource"
            },
            "description": "The items that were updated, in their Full shape.",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanItemsBulkPatchItemError"
            },
            "description": "The items that could not be updated, one entry per id.",
            "nullable": true
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Bulk plan-item patch result envelope: the items that updated and the per-item failures — a true partial\nsuccess. An id never appears in both. The request as a whole is validated FIRST, so a document naming an\nunwritable path, a column of another part or a value the column cannot hold is a 400 that changes\nnothing; once the request is valid this arrives with 200 even when every item failed."
      },
      "PlanOwnerInput": {
        "required": [
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "minLength": 1,
            "type": "string",
            "description": "Id of the user to make the owner, as a string GUID. Required. It must be a user of the plan's own tenant and not an API user; anyone else is reported as not found and nothing is written. Sending the CURRENT owner's id is accepted and changes nothing."
          }
        },
        "additionalProperties": false,
        "description": "The body updatePlanOwner takes: which user becomes the plan's owner."
      },
      "PlanOwnerRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the owner. A string GUID (see getUser).",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "description": "First name of the owner.",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the owner.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The owner of a plan. The id is a string GUID (a user id), and the first/last name fall back to\nthe plan's denormalized owner name when the user account no longer exists."
      },
      "PlanPartResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the part.",
            "format": "int32",
            "nullable": true
          },
          "planId": {
            "type": "integer",
            "description": "Id of the plan the part belongs to.",
            "format": "int32",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "Display label of the part.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the part.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the part.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the part within the plan.",
            "format": "double",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the part is active.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "plan"
            ],
            "type": "string",
            "description": "Type of the part.",
            "nullable": true
          },
          "planTemplatePartId": {
            "type": "integer",
            "description": "Id of the template part this part was created from, or null.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A part (section) of a plan. Returned by listPlanParts, scoped to the plan in the route."
      },
      "PlanPartResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanPartResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "PlanRecurringColumnsInput": {
        "required": [
          "isActive"
        ],
        "type": "object",
        "properties": {
          "isActive": {
            "type": "boolean",
            "description": "Whether the part's recurring columns are active. Required. Deactivating them hides them and drops their saved filter values; it keeps every item value, which is what makes this the reversible alternative to deleting the columns."
          }
        },
        "additionalProperties": false,
        "description": "The body updatePlanRecurringColumns and updatePlanTemplateRecurringColumns both take: one flag, applied\nto EVERY recurring column of the part at once. The field is nullable and required on purpose — a\nnon-nullable bool would bind an omitted field to false, so a body of {} would silently deactivate the\npart's recurring columns."
      },
      "PlanRelatedRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the related entity.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the related entity.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A related entity of a plan carrying the int id needed to round-trip to its own endpoint,\nalongside the display name (used for the plan template and the company groups)."
      },
      "PlanResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the plan. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the plan.",
            "nullable": true
          },
          "statusEnum": {
            "enum": [
              "undefined",
              "active",
              "completed"
            ],
            "type": "string",
            "description": "Lifecycle status of the plan: active or completed (undefined on a legacy row). archived is a REPORT status, not a plan one, and is rejected on /statusEnum here.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the plan. Only present in the Full view.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the plan. Only present in the Full view.",
            "nullable": true
          },
          "company": {
            "$ref": "#/components/schemas/PlanCompanyRef"
          },
          "template": {
            "$ref": "#/components/schemas/PlanRelatedRef"
          },
          "owner": {
            "$ref": "#/components/schemas/PlanOwnerRef"
          },
          "goals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanRelatedRef"
            },
            "description": "Goals linked to the whole plan (id + name, in goal order; filter with goalId, see listGoals); [] when it has none. A goal linked only to one of the plan's items is not listed here — read it off the item. Only present in the Full view, and only for a role that reads goals.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A plan visible to the caller (tenant scope + the caller's plan-permission rules). Fields are\nomitted from the JSON when not selected via the fields/view parameters (only requested fields\nare returned; id is always present)."
      },
      "PlanResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "PlanResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlanResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "PlanTemplateColumnResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the column. Match it against an item's columns[].columnId to read that item's values.",
            "format": "int32",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "Display label of the column.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the column, or null. Shown only inside the product; createPlanTemplateColumn and patchPlanTemplateColumn /description write it.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "customAppField",
              "customIntegrationField",
              "name",
              "status",
              "user",
              "startDate",
              "dueDate",
              "oneTimeBudget",
              "year",
              "month",
              "quantity",
              "recurringTotal",
              "effectiveDate",
              "cancellationDate",
              "image",
              "period",
              "site"
            ],
            "type": "string",
            "description": "Type of the column. Determines what its values mean and whether they can be written.",
            "nullable": true
          },
          "customTypeEnum": {
            "enum": [
              "undefined",
              "singleSelectDropDown",
              "text",
              "date",
              "user",
              "checkbox",
              "link",
              "image",
              "number",
              "html",
              "age",
              "smartMemory",
              "smartOS",
              "class"
            ],
            "type": "string",
            "description": "Kind of custom column on a customAppField column — text, date, user, checkbox, link, singleSelectDropDown and the internal-only kinds — and null on every built-in type. It decides the value type of the column, so createPlanTemplateColumn requires it with customAppField.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the column is active.",
            "nullable": true
          },
          "isRecurring": {
            "type": "boolean",
            "description": "Whether the column holds a recurring value.",
            "nullable": true
          },
          "isExcel": {
            "type": "boolean",
            "description": "Whether the column is backed by Excel data.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the column within the part. The default list order.",
            "format": "double",
            "nullable": true
          },
          "isEditable": {
            "type": "boolean",
            "description": "Whether createPlanTemplateItem, patchPlanTemplateItem and patchPlanTemplateItems may write this column's values for an item. This is about item VALUES — editing the COLUMN itself is patchPlanTemplateColumn, which this flag says nothing about. It is narrower than the same flag on a PLAN column: a User column is writable on a plan item and NOT on a template item, because a template is a blueprint and the internal template value seams refuse it.",
            "nullable": true
          },
          "patchPath": {
            "type": "string",
            "description": "The item-patch JSON Patch path that writes this column, for example /columns/17. Absent when isEditable is false. Use it verbatim as the path of a patchPlanTemplateItem operation, and its column id as a key of createPlanTemplateItem's columns object.",
            "nullable": true
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanColumnOption"
            },
            "description": "The allowed values of a dropdown-backed column, such as a Status column: an item's value in the column is one of these option ids. Absent for a column that is not dropdown-backed.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A column of a plan-template part. Returned by listPlanTemplateColumns and echoed by\ncreatePlanTemplateColumn, patchPlanTemplateColumn and updatePlanTemplateRecurringColumns, scoped to the\ntemplate and part in the route. UI-only column settings and view settings are not exposed externally.\n\nThe shape is the plan column's (External.API.Models.Plans.PlanColumnResource) minus the one field a template column\nhas no row for: `planTemplatePartColumnId` is a PLAN column's provenance pointer AT a template\ncolumn, so on a template column it would only ever be the column's own id."
      },
      "PlanTemplateColumnResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanTemplateColumnResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "PlanTemplateColumnResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlanTemplateColumnResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "PlanTemplateInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Display name of the template. Required, unique within your client, at most 50 characters."
          },
          "icon": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Icon of the template. At most 50 characters. Omitted leaves the server default.",
            "nullable": true
          },
          "color": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Colour of the template. At most 50 characters. Omitted leaves the server default.",
            "nullable": true
          },
          "includeItemDescriptions": {
            "type": "boolean",
            "description": "Carry the source plan's item descriptions into the template items. Applies to both create paths that have a source plan: createPlanTemplate (the planId in this body) and convertReportPlanToTemplate (the report part's own plan; this body carries no planId). Defaults to false."
          },
          "includeCustomColumns": {
            "type": "boolean",
            "description": "Carry the source plan's custom columns (and their values) into the template. Applies to both create paths that have a source plan: createPlanTemplate (the planId in this body) and convertReportPlanToTemplate (the report part's own plan; this body carries no planId). Defaults to false."
          },
          "planId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Optional identifier of a plan to build the template FROM (listPlans). A plan you cannot access is reported as not found. Omitted creates a blank template seeded with the default parts.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Create body for a plan template. Two shapes ride on the same operation: with no planId the template\nis created blank (and seeded with the default part scaffolding), with a planId it is built FROM that\nplan. The two include flags apply to the from-plan shape only and both default to false, matching the\ndocumented contract. Neither the tenant nor the per-user assignment list is part of the body: the\nclient comes from the caller's token and the assignments are managed internally."
      },
      "PlanTemplateItemColumnValue": {
        "type": "object",
        "properties": {
          "value": {
            "description": "The stored value, as the typed scalar for the column (string, number, boolean or UTC date).",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this value is a DEFAULT for the template. Only values with isDefault true are copied into a plan created from this template; a value with isDefault false stays in the template only.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One value an item holds in one of its part's columns, with the flag that decides whether it\npropagates into plans created from the template."
      },
      "PlanTemplateItemColumnValueInput": {
        "type": "object",
        "properties": {
          "value": {
            "description": "The value to store. Its type follows the column's typeEnum: text for Name and CustomAppField, a UTC date for the date columns, a number for OneTimeBudget, Year, Month and Quantity, and one of the column's own option ids (see listPlanTemplateColumns options) for Status. Those four numeric types are STORED AS TEXT, so a number written here reads back as a JSON string: send 42.5 and the item returns \"42.5\". Compare such a value as text, or parse it first.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of this value within the column. Leave at 0 for a single-valued column.",
            "format": "double"
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this value is a DEFAULT for the template — only values with isDefault true are copied into a plan created from this template. Defaults to TRUE when omitted, which is what makes a template value useful as a blueprint; send false for a value that should stay in the template only. patchPlanTemplateItems (the bulk form) has no isDefault channel at all and always writes false.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One value written into a plan-template item's column by createPlanTemplateItem or by\npatchPlanTemplateItem's /columns/{columnId} path. It is the plan item's value shape\n(External.API.Models.Plans.PlanItemColumnValueInput) plus the one field a template value has and a plan value\ndoes not: External.API.Models.PlanTemplates.PlanTemplateItemColumnValueInput.IsDefault, the flag that decides whether the value propagates into plans made\nfrom the template.\n\nWriting and reading are not symmetric for the numeric column types. OneTimeBudget, Year, Month and\nQuantity accept a number but are STORED as text, so the value comes back out of getPlanTemplateItem /\nlistPlanTemplateItems as a JSON string."
      },
      "PlanTemplateItemColumnValues": {
        "type": "object",
        "properties": {
          "columnId": {
            "type": "integer",
            "description": "Id of the column these values belong to (see listPlanTemplateColumns).",
            "format": "int32",
            "nullable": true
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanTemplateItemColumnValue"
            },
            "description": "The values held in that column, each with its own isDefault flag. Most columns hold a single value.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The values a template item holds in one of its part's columns. Match columnId against\nlistPlanTemplateColumns to learn the column's type and whether it is writable."
      },
      "PlanTemplateItemInput": {
        "required": [
          "typeEnum"
        ],
        "type": "object",
        "properties": {
          "typeEnum": {
            "enum": [
              "undefined",
              "item",
              "midItem",
              "group"
            ],
            "type": "string",
            "description": "Type of the item: \"item\" for an ordinary row or \"group\" for a group heading. Required — \"undefined\" and \"midItem\" are rejected with 400. A group's own rows are ordinary items nested under it through parentId."
          },
          "parentId": {
            "type": "integer",
            "description": "Id of the item to nest this one under. Must be an item of the SAME part; an item of another part or template is reported as not found. Omit to create the item at the top level.",
            "format": "int32",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the item is active. Defaults to true when omitted.",
            "nullable": true
          },
          "columns": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PlanTemplateItemColumnValueInput"
              },
              "nullable": true
            },
            "description": "Values to write into the new item's columns, keyed by column id. Only columns whose isEditable is true on listPlanTemplateColumns may be named: a read-only column is rejected with 400 and a column of another part with 404, and nothing is written either way. Each value carries its own isDefault.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The body createPlanTemplateItem takes. It is the plan item's create body\n(External.API.Models.Plans.PlanItemInput) plus the one field the plan create does not have: `typeEnum`,\nwhich is required here because the internal create takes it and validates nothing, so an omitted value\nwould persist the meaningless `undefined`.\n\nThere is no name field. The item's displayed name is its value in the part's Name-type column, so it is\nwritten through External.API.Models.PlanTemplates.PlanTemplateItemInput.Columns; sortOrder is assigned by the server (the new item is appended\nunder its parent) — patchPlanTemplateItem /sortOrder moves it afterwards, and\npatchPlanTemplateItem /description gives it a description."
      },
      "PlanTemplateItemResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the item.",
            "format": "int32",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "item",
              "midItem",
              "group"
            ],
            "type": "string",
            "description": "Type of the item — an ordinary item or a group heading.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the item is active.",
            "nullable": true
          },
          "isCollapsed": {
            "type": "boolean",
            "description": "Whether the item is collapsed in the UI.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the item within its part. The default list order.",
            "format": "double",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the item. Absent in the Summary view of listPlanTemplateItems; always present in the Full view and in the single-item reads and write echoes.",
            "nullable": true
          },
          "descriptionLength": {
            "type": "integer",
            "description": "Character count of the stored description, or null when the item has none. Present in every view, so a Summary row still says whether a description exists and how big it is before you fetch it with getPlanTemplateItem.",
            "format": "int32",
            "nullable": true
          },
          "parentId": {
            "type": "integer",
            "description": "Id of the item this one is nested under, or null for a top-level item.",
            "format": "int32",
            "nullable": true
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanTemplateItemColumnValues"
            },
            "description": "The item's values, grouped by column. Empty when the item holds no values.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single item (row) of a plan-template part. Returned by listPlanTemplateItems and\ngetPlanTemplateItem, and echoed by createPlanTemplateItem, patchPlanTemplateItem, copyPlanTemplateItem\nand patchPlanTemplateItems. The item's displayed name is the value it holds in the part's Name-type\ncolumn, not a field of its own — read it out of External.API.Models.PlanTemplates.PlanTemplateItemResource.Columns."
      },
      "PlanTemplateItemResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanTemplateItemResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "PlanTemplateItemResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlanTemplateItemResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "PlanTemplateItemsBulkPatchResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanTemplateItemResource"
            },
            "description": "The items that were updated, in the shape listPlanTemplateItems serves.",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanItemsBulkPatchItemError"
            },
            "description": "The items that could not be updated, one entry per id.",
            "nullable": true
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Bulk plan-template-item patch result envelope: the items that updated and the per-item failures — a\ntrue partial success. An id never appears in both. The request as a whole is validated FIRST, so a\ndocument naming an unwritable path, a column of another part or a value the column cannot hold is a 400\nthat changes nothing; once the request is valid this arrives with 200 even when every item failed.\n\nIt exists alongside the plan surface's External.API.Models.Plans.PlanItemsBulkPatchResponse for one reason: the rows\nit echoes are External.API.Models.PlanTemplates.PlanTemplateItemResource. The per-item failure entry is the SHARED\nExternal.API.Models.Plans.PlanItemsBulkPatchItemError — it carries an id, a code and a message, none of which is\nresource-specific — and the request body is the shared External.API.Models.Plans.PlanItemsBulkPatchInput."
      },
      "PlanTemplateItemsInsertInput": {
        "required": [
          "templateId",
          "templatePartId"
        ],
        "type": "object",
        "properties": {
          "templateId": {
            "type": "integer",
            "description": "Id of the plan template to copy items from. Required. A template you cannot see is reported as not found and nothing is written.",
            "format": "int32"
          },
          "templatePartId": {
            "type": "integer",
            "description": "Id of the part OF THAT TEMPLATE whose items are copied. Required. A part belonging to another template is reported as not found; a part that holds no items to copy is rejected as invalid (400 validationFailed), not as not found.",
            "format": "int32"
          },
          "parentId": {
            "type": "integer",
            "description": "Id of an item of the target part to nest the copied items under. Omit (or send null) to insert them as root items. An item of another part is reported as not found. The copied items keep the template's own nesting among themselves; this is only where that sub-tree is attached.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The body insertPlanTemplateItems takes: which plan template part to copy items from, and where in the\ntarget part to put them.\n\nBoth ids are nullable and required on purpose — a non-nullable int would bind an omitted field to 0 and\nthe request would go looking for template 0 instead of being rejected as incomplete."
      },
      "PlanTemplatePartInput": {
        "required": [
          "label",
          "typeEnum"
        ],
        "type": "object",
        "properties": {
          "label": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Display label of the part. Required, at most 50 characters."
          },
          "color": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Colour of the part. Optional, at most 50 characters.",
            "nullable": true
          },
          "icon": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Icon of the part. Optional, at most 50 characters.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the part is active. Defaults to true when omitted.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether the part becomes the template's default part. Defaults to false when omitted. A template holds at most one part per flag state, so this must be the state the template is not already using — otherwise the request is rejected with 400. Unlike patchPlanTemplatePart, the create does NOT demote the part that currently holds the flag.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "plan"
            ],
            "type": "string",
            "description": "Type of the part. Required, and it must be a type the template does not already hold — a second part of the same type is rejected with 400. A template created by createPlanTemplate already holds its \"plan\" part, so undefined is in practice the only type it accepts."
          },
          "insertAfterPartId": {
            "type": "integer",
            "description": "Id of an existing part of the SAME template the new part is placed after; omit to place it first. A part id of another template, or one that does not exist, is 404 notFound.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Create body for a part (section) of a plan template. label and typeEnum are required; sortOrder is\ndecided by the server from External.API.Models.PlanTemplates.PlanTemplatePartInput.InsertAfterPartId.\n\nTwo database rules make this a much narrower operation than the field list suggests, and BOTH are\nanswered with 400 rather than a server error: a template holds at most ONE part per typeEnum, and the\nunique index on (template, isDefault) holds at most ONE part with isDefault true and ONE with\nisDefault false. A template created by createPlanTemplate already carries a \"Plan\" part whose\nisDefault is true — so on such a template the only accepted combination is\ntypeEnum \"undefined\" with isDefault false (the default), and there is room for exactly one."
      },
      "PlanTemplatePartResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the part. Taken by listPlanTemplateColumns and listPlanTemplateItems.",
            "format": "int32",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "Display label of the part.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the part.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the part.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the part within the template.",
            "format": "double",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the part is active.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "plan"
            ],
            "type": "string",
            "description": "Type of the part.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the template's default part. Single-valued per template, and so is its opposite: the database caps a template at ONE part with isDefault true and ONE with isDefault false, so a template holds at most two parts and createPlanTemplatePart must send the flag the template is not already using.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A part (section) of a plan template. Returned by listPlanTemplateParts and echoed by\ncreatePlanTemplatePart / patchPlanTemplatePart, scoped to the template in the route. A plan created\nfrom the template gets a copy of each part, which carries this part's id as its planTemplatePartId."
      },
      "PlanTemplatePartResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanTemplatePartResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "PlanTemplatePartResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlanTemplatePartResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "PlanTemplateResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the plan template. Always returned. Round-trips into listPlans.templateId.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the template. Unique within your client, at most 50 characters.",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is your client's default template — the one a new plan starts from when no template is named. At most one template per client carries it.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Short free-text description of the template, at most 256 characters.",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Long free-text note on the template, at most 4000 characters. Plain text, not HTML.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the template.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the template.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A plan template — the blueprint a plan is stamped out from. Returned by listPlanTemplates and\ngetPlanTemplate. Fields are omitted from the JSON when not selected via the fields/view\nparameters (only requested fields are returned; id is always present). The template's tenant is\nnever exposed: it always equals the caller's own client."
      },
      "PlanTemplateResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanTemplateResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "PlanTemplateResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlanTemplateResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "PlanUserAccessLevelInput": {
        "required": [
          "accessLevel",
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "minLength": 1,
            "type": "string",
            "description": "Id of the user whose access level changes, as a string GUID. Required. It must be a user listPlanUsers returns for this plan; anything else is reported in the response's errors."
          },
          "accessLevel": {
            "enum": [
              "noAccess",
              "readOnly",
              "editContentOnly",
              "editContentAndStructure",
              "fullAccess"
            ],
            "type": "string",
            "description": "The access level to set: readOnly, editContentOnly, editContentAndStructure, fullAccess or noAccess. Required. noAccess REMOVES the user from the plan entirely — it deletes their permissions rather than storing a 'no access' row, so listPlanUsers stops returning them."
          }
        },
        "additionalProperties": false,
        "description": "One user's new access level in an updatePlanUsersAccessLevel request.\n\naccessLevel is nullable and required on purpose — a non-nullable enum would bind an omitted field to\nthe CLR default, which for UserAccessEnum is not even a declared member."
      },
      "PlanUserAccessLevelItemError": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the user whose access level did not change, as a string GUID.",
            "nullable": true
          },
          "code": {
            "enum": [
              "validationFailed",
              "notFound",
              "accessDenied",
              "internalError",
              "idempotencyKeyReused",
              "requestInProgress",
              "unauthenticated",
              "notImplemented",
              "rateLimited"
            ],
            "type": "string",
            "description": "Stable, documented error codes for the external API. Values are CONTRACT once shipped\n(rename = breaking change). New values are added as real cases appear; every addition must\nland in the External API Guide's error-code catalog in the same change."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation of the failure.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One per-user failure in an updatePlanUsersAccessLevel response: the user id, a machine-readable code\n(the shared ExternalErrorCode, so it matches the single-resource error contract) and a human-readable\nmessage."
      },
      "PlanUserResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the user. A string GUID — the same id listUsers and getUser publish, and the one addPlanUsers, removePlanUser, updatePlanUsersAccessLevel and updatePlanOwner take.",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "description": "First name of the user, read from the user record itself.",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the user, read from the user record itself.",
            "nullable": true
          },
          "accessLevel": {
            "enum": [
              "noAccess",
              "readOnly",
              "editContentOnly",
              "editContentAndStructure",
              "fullAccess"
            ],
            "type": "string",
            "description": "What the user can do on THIS plan, derived from the permissions stored for it: noAccess, readOnly, editContentOnly, editContentAndStructure or fullAccess. An Admin always reads fullAccess whatever is stored. A user holding no permissions on the plan reads noAccess, which is what listPlanAvailableUsers reports for everyone not on it yet.",
            "nullable": true
          },
          "isOwner": {
            "type": "boolean",
            "description": "Whether this user owns the plan. AT MOST one row carries it: the listing selects on permissions and role, and ownership is neither, so an owner holding no permission row and no blanket role is absent from it — read the owner from getPlan. updatePlanOwner moves the flag. The owner cannot be removed and their access level cannot be changed.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A user in relation to one plan: who they are, what they can do on it and whether they own it.\nReturned by listPlanUsers, listPlanAvailableUsers, addPlanUsers and updatePlanUsersAccessLevel.\n\nThe row is deliberately narrower than the internal one. Email, the user's tenant role and the\nrole-derived default access level are all withheld: listPlanAvailableUsers already enumerates the\ntenant's staff, and there is no reason for it to publish a directory as well. Read a user's own fields\nwith getUser instead."
      },
      "PlanUserResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanUserResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "PlanUsersAccessLevelInput": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanUserAccessLevelInput"
            },
            "description": "The per-user access-level changes to apply. Required and non-empty. Each userId may appear once. Users are processed independently: the ones that succeed are in the response's items and the ones that do not are in its errors."
          }
        },
        "additionalProperties": false,
        "description": "The body updatePlanUsersAccessLevel takes: one entry per user whose access level changes.\n\nThe entries are wrapped in an object rather than sent as a bare JSON array because every request body\non this surface is a named schema — that is what gives the operation an OpenAPI component with a\ndescription of its own, which a bare array would not have."
      },
      "PlanUsersAccessLevelResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanUserResource"
            },
            "description": "The users whose access level was changed, in the listPlanUsers row shape. A user set to noAccess appears here having been removed from the plan, so their accessLevel reads noAccess.",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanUserAccessLevelItemError"
            },
            "description": "The users whose access level could not be changed, one entry per id.",
            "nullable": true
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "updatePlanUsersAccessLevel result envelope: the users whose access level changed and the per-user\nfailures — a true partial success. A user id never appears in both. The request as a whole is validated\nFIRST, so a malformed body or a repeated id is a 400 that changes nothing; once the request is valid\nthis arrives with 200 even when every entry failed."
      },
      "PlanUsersAddInput": {
        "required": [
          "userIds"
        ],
        "type": "object",
        "properties": {
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Ids of the users to add, as string GUIDs. Required and non-empty. Every id must be one listPlanAvailableUsers returns for this plan — a user of another tenant, or one the plan's company does not reach, is reported as not found and NOTHING is written. An id already on the plan is accepted and left exactly as it is."
          }
        },
        "additionalProperties": false,
        "description": "The body addPlanUsers takes: which users to give access to the plan.\n\nThe list is required and non-empty on purpose. The internal seam silently drops any id it cannot\nassign, so this surface checks every id against the plan's available users FIRST and reports an\nunusable one as not found with nothing written, rather than answering an empty success."
      },
      "ProjectColumnResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the column.",
            "format": "int32"
          },
          "label": {
            "type": "string",
            "description": "Display label of the column.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the column, or null.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "customAppField",
              "customIntegrationField",
              "name",
              "psaLink",
              "status",
              "type",
              "board",
              "manager",
              "startDate",
              "estimatedCompletionDate",
              "percentComplete",
              "hours",
              "initiative",
              "actualCompletionDate",
              "budgetHours",
              "actualHours",
              "budgetAmount",
              "proposal",
              "description",
              "company",
              "isClosed",
              "planItems"
            ],
            "type": "string",
            "description": "Which field of a project the column describes: standard columns describe a field of the project; customIntegrationField marks a custom PSA field whose values arrive in a project's columnValues."
          },
          "customColumnTypeEnum": {
            "enum": [
              "undefined",
              "singleSelectDropDown",
              "text",
              "date",
              "user",
              "checkbox",
              "link",
              "image",
              "number",
              "html",
              "age",
              "smartMemory",
              "smartOS",
              "class"
            ],
            "type": "string",
            "description": "Value type of a custom column: how to read the values it holds. Null for standard columns.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "The column's active flag; every Projects column is active. Whether a column is shown is a per-view setting in the application, which this list does not carry."
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of the column in the module's column order.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One column definition of the Projects module. A standard column (name, status, type, board, the dates and hours,\n...) describes a field of the project itself; a custom column (customIntegrationField) describes a custom PSA field\nwhose values arrive in a project's columnValues, and its customColumnTypeEnum says how to read them. The set is kept\nby the ConnectWise sync; no operation writes it."
      },
      "ProjectColumnResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectColumnResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "ProjectColumnValueModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the stored value row. Stable for as long as the value exists.",
            "format": "int32"
          },
          "value": {
            "description": "The value itself, in the JSON type it was stored in (see the column's customColumnTypeEnum).",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Position of this value among the values the project holds in the same column.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One value a project holds in a custom column. The value is returned in its own JSON type (boolean, number, date-time\nstring or text), as the ConnectWise sync stored it; the paired column's customColumnTypeEnum in listProjectColumns\nsays how to read it."
      },
      "ProjectColumnValuesModel": {
        "type": "object",
        "properties": {
          "columnId": {
            "type": "integer",
            "description": "Id of the column these values belong to (see listProjectColumns).",
            "format": "int32"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectColumnValueModel"
            },
            "description": "The values held in that column, in their stored order. Most columns hold a single value.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The values a project holds in one custom column: a custom PSA field the ConnectWise sync copies. The standard\ncolumns (name, status, type, board, the dates and hours, ...) are fields of the project itself and never appear\nhere."
      },
      "ProjectCountLineResource": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The status meaning (Open, On hold, Closed), the board name or the client name; \"(none)\" is the board line of projects whose board has no name.",
            "nullable": true
          },
          "count": {
            "type": "integer",
            "description": "Matching projects in the group.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "One group of the matched projects: a status meaning, a project board or a client."
      },
      "ProjectInitiativesLinkInput": {
        "required": [
          "initiativeItemIds"
        ],
        "type": "object",
        "properties": {
          "initiativeItemIds": {
            "maxItems": 100,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Initiative item ids, the id of listInitiativeItems. Required, 1-100 positive ids; a repeated id counts once. An empty, longer or non-positive list fails the whole request with nothing written."
          }
        },
        "additionalProperties": false,
        "description": "Body of linkProjectInitiatives and unlinkProjectInitiatives: the initiative items to link to, or unlink from, one\nproject. Ids are handled independently: each one that cannot be written is reported in the response's errors."
      },
      "ProjectLinkPlanItemInput": {
        "required": [
          "item",
          "plan"
        ],
        "type": "object",
        "properties": {
          "plan": {
            "minLength": 1,
            "type": "string",
            "description": "The plan's name, exact (case aside)."
          },
          "item": {
            "minLength": 1,
            "type": "string",
            "description": "The row's name in that plan (an Item or Group row), exact (case aside): link_project looks in the plan's first part, unlink_project among the plan's rows linked to the project, whatever their part; several rows of the name return candidates with their parent row (link_project) or part (unlink_project)."
          }
        },
        "additionalProperties": false,
        "description": "One plan row of link_project and unlink_project, by name: the plan, then the row in that plan (link_project: a row of\nthe plan's first part; unlink_project: a row of the plan linked to the project, in any part). A row name recurs\nacross a client's plans (plans are copied year to year), so the plan says which one is meant."
      },
      "ProjectLinkedInitiativeResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the initiative item (see listInitiativeItems / getInitiativeItem).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the initiative item. Absent when the Initiatives Name column is internal and hidden from your role.",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/ProjectLinkedStatusRef"
          },
          "month": {
            "type": "integer",
            "description": "Budget month of the initiative item (1-12), or null.",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Budget year of the initiative item, or null.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An initiative item linked to a project, as the project's relationships block shows it. When the Initiatives Name or\nStatus column is internal and your role may not read internal columns, that field is absent."
      },
      "ProjectLinkedPlanItemResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the plan item (see listPlanItems).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "The plan item's value in its part's Name column.",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/ProjectLinkedStatusRef"
          },
          "plan": {
            "$ref": "#/components/schemas/ProjectRelatedRef"
          },
          "part": {
            "$ref": "#/components/schemas/ProjectRelatedRef"
          }
        },
        "additionalProperties": false,
        "description": "A plan item linked to a project, with the plan and the plan part it belongs to."
      },
      "ProjectLinkedStatusRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the status option, as the linked row's Status column stores it.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Label of the status option.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The status of a row linked to a project: an option of that row's own Status column (the initiative's or the plan\npart's), not a project status."
      },
      "ProjectPlanItemsLinkInput": {
        "required": [
          "planItemIds"
        ],
        "type": "object",
        "properties": {
          "planItemIds": {
            "maxItems": 100,
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Plan item ids, the id of listPlanItems on a plan's first part (listPlanParts), Item or Group rows. Required, 1-100 positive ids; a repeated id counts once. An empty, longer or non-positive list fails the whole request with nothing written."
          }
        },
        "additionalProperties": false,
        "description": "Body of linkProjectPlanItems and unlinkProjectPlanItems: the plan items to link to, or unlink from, one project. Ids\nare handled independently: each one that cannot be written is reported in the response's errors."
      },
      "ProjectRelatedRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the related entity.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the related entity.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A related entity of a project that is keyed by an integer id: the company the project belongs to, its type, board,\nmanager and proposal, and the plan and plan part of a linked plan item. Carries id + name in every view, per the\nshared related-entity rule."
      },
      "ProjectRelationshipsLinkResponse": {
        "type": "object",
        "properties": {
          "relationships": {
            "$ref": "#/components/schemas/ProjectRelationshipsResource"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelationshipLinkItemError"
            },
            "description": "The ids that were not linked (or not unlinked), one entry each with a code and a message naming the records. Empty when every id was written; on a link, a pair that was already linked is not an error.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Result of the project link and unlink operations, the data of the { data, requestId } envelope: the project's\nrelationships after the write and one error per id that was not written, a true partial success. The body is\nvalidated FIRST, so a malformed one is a 400 that writes nothing; once it is valid this arrives with 200 even when\nevery id failed."
      },
      "ProjectRelationshipsLinkResponseExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ProjectRelationshipsLinkResponse"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "ProjectRelationshipsResource": {
        "type": "object",
        "properties": {
          "initiatives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectLinkedInitiativeResource"
            },
            "description": "Initiative items linked to the project (see listInitiativeItems). Empty when none you can see is linked.",
            "nullable": true
          },
          "planItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectLinkedPlanItemResource"
            },
            "description": "Plan items linked to the project directly, each with its plan and plan part; there are no whole-plan project links. Empty when none you can see is linked.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The project's relationships, read-only: the initiative items and plan items linked to the project whose other end\nyou can see. On getProject and listProjects in the Full view (or with fields=Relationships), and on the link\nresponses; links are added with linkProjectInitiatives and linkProjectPlanItems and removed with their unlink twins.\nThe arrays are never null: an empty array means nothing you can see is linked."
      },
      "ProjectResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the project. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name of the project, as the PSA sends it.",
            "nullable": true
          },
          "company": {
            "$ref": "#/components/schemas/ProjectRelatedRef"
          },
          "status": {
            "$ref": "#/components/schemas/ProjectStatusRef"
          },
          "type": {
            "$ref": "#/components/schemas/ProjectRelatedRef"
          },
          "board": {
            "$ref": "#/components/schemas/ProjectRelatedRef"
          },
          "manager": {
            "$ref": "#/components/schemas/ProjectRelatedRef"
          },
          "proposal": {
            "$ref": "#/components/schemas/ProjectRelatedRef"
          },
          "startDate": {
            "type": "string",
            "description": "Start date of the project: a calendar date at 00:00, no time zone. Absent when not set.",
            "format": "date-time",
            "nullable": true
          },
          "estimatedCompletionDate": {
            "type": "string",
            "description": "Estimated completion date of the project: a calendar date at 00:00, no time zone. Absent when not set.",
            "format": "date-time",
            "nullable": true
          },
          "actualCompletionDate": {
            "type": "string",
            "description": "Actual completion date of the project: a calendar date at 00:00, no time zone. Absent when not set. Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "percentComplete": {
            "type": "number",
            "description": "Percent complete, as the PSA sends it; absent when it sends none, which is not 0.",
            "format": "double",
            "nullable": true
          },
          "budgetHours": {
            "type": "number",
            "description": "Budget hours, as the PSA sends them. Absent when not set. Only present in the Full view.",
            "format": "double",
            "nullable": true
          },
          "actualHours": {
            "type": "number",
            "description": "Actual hours, as the PSA sends them. Absent when not set. Only present in the Full view.",
            "format": "double",
            "nullable": true
          },
          "budgetAmount": {
            "type": "number",
            "description": "Budget amount, as the PSA sends it (informational; in currencyCode). Absent when not set. Only present in the Full view.",
            "format": "double",
            "nullable": true
          },
          "currencyCode": {
            "type": "string",
            "description": "Currency of budgetAmount. Absent when not set. Only present in the Full view.",
            "nullable": true
          },
          "isInternal": {
            "type": "boolean",
            "description": "The project's own Internal flag, the one patchProject writes, stored as sent. A project is hidden from client users while isInternal is true or inheritedInternalSources is not empty.",
            "nullable": true
          },
          "inheritedInternalSources": {
            "type": "array",
            "items": {
              "enum": [
                "status",
                "type",
                "board"
              ],
              "type": "string"
            },
            "description": "Status, type or board whose Internal flag makes the project internal anyway; [] when none. A project is hidden from client users while isInternal is true or inheritedInternalSources is not empty; isInternal itself is stored as sent. Read-only here.",
            "nullable": true
          },
          "linkStatus": {
            "enum": [
              "none",
              "mapped",
              "orphan",
              "wasMapped"
            ],
            "type": "string",
            "description": "Sync state of the project: mapped = synced from the PSA now, the only state that takes new links; orphan = was synced, no longer found in the PSA; wasMapped = was synced, then cut from the sync by an integration-settings change; none = never synced. Filter with linkStatus.",
            "nullable": true
          },
          "integratedSystemId": {
            "type": "string",
            "description": "The ConnectWise project id. Absent when the project has no sync record. Only present in the Full view.",
            "nullable": true
          },
          "integrationId": {
            "type": "integer",
            "description": "The ConnectWise integration (see listIntegrations), set together with integratedSystemId. Only present in the Full view.",
            "format": "int32",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Plain-text description of the project, as the PSA sends it. Only on getProject and the patchProject response; never on listProjects.",
            "nullable": true
          },
          "columnValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectColumnValuesModel"
            },
            "description": "Values of the custom PSA fields, grouped per column (see listProjectColumns). Only present in the Full view.",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "When the project was created (UTC), by the sync. Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "description": "When the project was last updated (UTC); absent on a project never updated since creation. Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "relationships": {
            "$ref": "#/components/schemas/ProjectRelationshipsResource"
          }
        },
        "additionalProperties": false,
        "description": "One PSA project of the caller's client, in a company the caller can see. The ConnectWise sync creates and updates\nprojects; one it stops returning stays, as orphan, until an Admin or Manager deletes unmapped projects in the\napplication. The one field a caller writes is isInternal (patchProject). Fields are omitted from the JSON when\nthey are not selected through the fields / view parameters, and a selected field is omitted when its value is null\n(id is always present). Relationships are read-only output on the reads."
      },
      "ProjectResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "ProjectResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ProjectResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "ProjectRowResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Project name as the PSA sends it.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "The PSA status name.",
            "nullable": true
          },
          "statusMeans": {
            "type": "string",
            "description": "What the status means: Open, On hold or Closed.",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "Project type name.",
            "nullable": true
          },
          "board": {
            "type": "string",
            "description": "Project board name.",
            "nullable": true
          },
          "manager": {
            "type": "string",
            "description": "The project manager's name as the PSA sends it; omitted when none.",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "description": "Start date, yyyy-MM-dd; omitted when not set.",
            "nullable": true
          },
          "estimatedCompletionDate": {
            "type": "string",
            "description": "Estimated completion date, yyyy-MM-dd; omitted when not set.",
            "nullable": true
          },
          "actualCompletionDate": {
            "type": "string",
            "description": "Actual completion date, yyyy-MM-dd; omitted when not set.",
            "nullable": true
          },
          "percentComplete": {
            "type": "number",
            "description": "Percent complete as the PSA sends it; omitted when it sends none (never computed).",
            "format": "double",
            "nullable": true
          },
          "budgetHours": {
            "type": "number",
            "description": "Budgeted hours as the PSA sends them.",
            "format": "double",
            "nullable": true
          },
          "actualHours": {
            "type": "number",
            "description": "Actual hours as the PSA sends them.",
            "format": "double",
            "nullable": true
          },
          "budgetAmount": {
            "type": "number",
            "description": "Budget amount as the PSA sends it, in currencyCode.",
            "format": "double",
            "nullable": true
          },
          "currencyCode": {
            "type": "string",
            "description": "Currency of budgetAmount.",
            "nullable": true
          },
          "isInternal": {
            "type": "boolean",
            "description": "The project's own Internal flag, the one update_project sets, stored as sent: the project is hidden from client users while it is true or inheritedInternalSources is not empty."
          },
          "inheritedInternalSources": {
            "type": "array",
            "items": {
              "enum": [
                "status",
                "type",
                "board"
              ],
              "type": "string"
            },
            "description": "The lookups (status, type, board) marked internal; while any is listed the project is hidden from client users whatever isInternal says. Empty when none.",
            "nullable": true
          },
          "linkStatus": {
            "enum": [
              "none",
              "mapped",
              "orphan",
              "wasMapped"
            ],
            "type": "string",
            "description": "mapped = synced from the PSA now, the only state that takes new links; orphan = was synced, no longer found in the PSA; wasMapped = was synced, then cut from the sync by an integration-settings change; none = never synced."
          },
          "linkedInitiatives": {
            "type": "integer",
            "description": "Initiative items linked to the project that you can see.",
            "format": "int32"
          },
          "linkedPlanItems": {
            "type": "integer",
            "description": "Plan items linked to the project that you can see (trashed plans never).",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "One project, by names only, with how many initiatives and plan items its relationships show you. Never its\ndescription nor its custom values."
      },
      "ProjectStatusRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the project status (filter with statusId).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "The PSA's own status name.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Pill colour computed from means; never stored.",
            "nullable": true
          },
          "means": {
            "enum": [
              "open",
              "onHold",
              "closed"
            ],
            "type": "string",
            "description": "What the status means to StrategyOverview: open, onHold or closed (filter with statusMeans).",
            "nullable": true
          },
          "isClosed": {
            "type": "boolean",
            "description": "Whether means is closed (filter with isClosed).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The status of a project: the PSA's own status, created and named by the ConnectWise sync, with what it means to\nStrategyOverview. The id is what the statusId filter takes; no operation lists the statuses, so the ids come from\nthe projects themselves."
      },
      "ProposalCompanyRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the company (see listCompanies; the value the companyId filter takes).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the company.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The company (client) a proposal belongs to: a StrategyOverview company, so its id is the one listCompanies returns.\nFilter proposals by it with companyId."
      },
      "ProposalCountLineResource": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The base status (Open, Accepted, Declined), the stage name or the client name; \"(none)\" is the stage line of the proposals without a stage, and the base status line of the proposals of no known base status.",
            "nullable": true
          },
          "count": {
            "type": "integer",
            "description": "Matching proposals in the group.",
            "format": "int32"
          },
          "amount": {
            "type": "number",
            "description": "The sum of the group's amounts as the PSA sends them, a missing amount counted as 0; no currency is carried.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One group of the matched proposals: a base status, a stage or a client, with the sum of its amounts."
      },
      "ProposalLinkedInitiativeItemRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the linked initiative item (see getInitiativeItem).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the initiative item. Absent when the Initiatives Name column is internal and the caller's role cannot read internal columns.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An initiative item a proposal is linked to (id + name). The id is an initiative item id (getInitiativeItem)."
      },
      "ProposalLinkedPlanItemRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the linked plan item.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "The plan item's value in its part's Name column. Absent when it has none.",
            "nullable": true
          },
          "planId": {
            "type": "integer",
            "description": "Id of the plan the item belongs to (see getPlan).",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A plan item a proposal is linked to (id + name), with the plan it belongs to."
      },
      "ProposalProductResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the product line.",
            "format": "int32"
          },
          "description": {
            "type": "string",
            "description": "Text of the line, as the PSA sends it.",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "Quantity; absent on a line without one (an estimate line), which is not 0.",
            "format": "double",
            "nullable": true
          },
          "unitPrice": {
            "type": "number",
            "description": "Price per unit (amount / quantity); absent whenever quantity is.",
            "format": "double",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Amount of the line as the PSA reports it; per billing cycle on a recurring line, so the lines of a recurring proposal do not add up to its amount. No currency is stored.",
            "format": "double",
            "nullable": true
          },
          "isRecurring": {
            "type": "boolean",
            "description": "Whether the line recurs; a recurring line's amount is per billingCycleName."
          },
          "billingCycleName": {
            "type": "string",
            "description": "Billing cycle of a recurring line, as the PSA names it (for example Monthly); absent on a line that does not recur.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One product line of a proposal: a read-only copy of a PSA forecast line, replaced as a whole on every sync."
      },
      "ProposalRelatedRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The PSA's own id of the value (a string).",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "The name the PSA gave the value, as last synced.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A PSA value a proposal refers to: its type, its owner (the PSA member, the sales rep) or its contact. The id is the\nPSA's own identifier, a string; the name is the snapshot the ConnectWise sync stored with the proposal. These are\nnot StrategyOverview records, so no operation lists them."
      },
      "ProposalRelationshipsResource": {
        "type": "object",
        "properties": {
          "initiativeItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProposalLinkedInitiativeItemRef"
            },
            "description": "Initiative items linked to the proposal (id + name; see getInitiativeItem), ordered by name then id. Always [] for a role without Initiatives_Items Read. A name is absent when the Initiatives Name column is internal and the caller's role cannot read internal columns.",
            "nullable": true
          },
          "planItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProposalLinkedPlanItemRef"
            },
            "description": "Plan items linked to the proposal (id + name + planId; see getPlan), ordered by plan name, plan id, item name, then id. Only items of plans the caller may read; items of trashed plans never appear.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The read-only relationships block of a proposal: the initiative items and the plan items it is linked to, as the\nProposals module's own list columns show them. Both arrays are always present; empty means nothing the caller may see\nis linked. Links are made in the application; this surface does not write them."
      },
      "ProposalResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the proposal in StrategyOverview. Always returned. Not the id of a project's proposal ref (project.proposal.id).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the proposal, as the PSA sends it.",
            "nullable": true
          },
          "company": {
            "$ref": "#/components/schemas/ProposalCompanyRef"
          },
          "status": {
            "$ref": "#/components/schemas/ProposalStatusRef"
          },
          "stage": {
            "$ref": "#/components/schemas/ProposalStageRef"
          },
          "type": {
            "$ref": "#/components/schemas/ProposalRelatedRef"
          },
          "baseStatus": {
            "enum": [
              "undefined",
              "open",
              "accepted",
              "declined"
            ],
            "type": "string",
            "description": "What the status means to StrategyOverview, derived by the sync from the PSA's status flags: open (no won or lost outcome, whether or not the status is a closed one), accepted (won) or declined (lost). Filter the proposals that are not closed with isClosed=false.",
            "nullable": true
          },
          "isClosed": {
            "type": "boolean",
            "description": "Whether the proposal's PSA status is a closed one. Independent of baseStatus: an accepted proposal, or one with no outcome, can be closed or not.",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Value of the proposal as the PSA reports it (its forecast revenue total); informational. No currency is stored. Absent when the PSA reports none, which is not 0.",
            "format": "double",
            "nullable": true
          },
          "recurringAmount": {
            "type": "number",
            "description": "The PSA's recurring total: the per-billing-cycle sum of the recurring lines, as the PSA reports it. Absent when the PSA reports none.",
            "format": "double",
            "nullable": true
          },
          "probability": {
            "type": "number",
            "description": "Probability of closing, in percent (0-100), as the PSA sends it. Absent when not set.",
            "format": "double",
            "nullable": true
          },
          "expectedCloseDate": {
            "type": "string",
            "description": "Expected close date: a calendar date at 00:00, no time zone. Absent when not set.",
            "format": "date-time",
            "nullable": true
          },
          "owner": {
            "$ref": "#/components/schemas/ProposalRelatedRef"
          },
          "isInternal": {
            "type": "boolean",
            "description": "The proposal's own Internal flag, set in the application. A proposal is hidden from client users in the application while isInternal, status.isInternal or stage.isInternal is true.",
            "nullable": true
          },
          "contact": {
            "$ref": "#/components/schemas/ProposalRelatedRef"
          },
          "enteredDate": {
            "type": "string",
            "description": "When the opportunity was entered in the PSA (the PSA's dateBecameLead), an instant in UTC. Absent when the PSA has none. Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "integratedSystemId": {
            "type": "string",
            "description": "The PSA opportunity id. Only present in the Full view.",
            "nullable": true
          },
          "integrationId": {
            "type": "integer",
            "description": "The PSA integration the proposal is synced through (see listIntegrations). Only present in the Full view.",
            "format": "int32",
            "nullable": true
          },
          "lastSyncedAt": {
            "type": "string",
            "description": "When the sync last refreshed the proposal (UTC). Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "When the proposal was first stored in StrategyOverview (UTC), by the sync; not the PSA's entered date. Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "description": "When the proposal was last updated in StrategyOverview (UTC); absent on one never updated since it was stored. Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "relationships": {
            "$ref": "#/components/schemas/ProposalRelationshipsResource"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProposalProductResource"
            },
            "description": "Only on getProposal: the product lines in the PSA's own line order; [] when none.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One proposal of the caller's client, in a company the caller can see: a PSA (ConnectWise) opportunity that the\nsync mirrors read-only into StrategyOverview's Proposals module. Fields are omitted from the JSON when they are not\nselected through the fields / view parameters, and a selected field is omitted when its value is null (id is always\npresent). Status, stage, type, owner and contact are PSA values with the PSA's string ids, not StrategyOverview\nrecords."
      },
      "ProposalResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProposalResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "ProposalResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ProposalResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "ProposalRowResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Proposal name as the PSA sends it.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "The PSA status name as last synced.",
            "nullable": true
          },
          "stage": {
            "type": "string",
            "description": "The PSA stage name as last synced; omitted when the proposal has no stage.",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "The PSA opportunity type name as last synced; omitted when none.",
            "nullable": true
          },
          "baseStatus": {
            "type": "string",
            "description": "What the status means to StrategyOverview, as the byBaseStatus lines name it: Open (no won or lost outcome, whether or not the status is a closed one: see closed), Accepted or Declined.",
            "nullable": true
          },
          "closed": {
            "type": "boolean",
            "description": "Whether the proposal's PSA status is a closed one, whatever its base status; open=true returns the proposals where it is false."
          },
          "amount": {
            "type": "number",
            "description": "Amount as the PSA sends it; no currency is carried; omitted when not set.",
            "format": "double",
            "nullable": true
          },
          "recurringAmount": {
            "type": "number",
            "description": "Recurring amount as the PSA sends it; no currency is carried; omitted when not set.",
            "format": "double",
            "nullable": true
          },
          "probability": {
            "type": "number",
            "description": "Probability in percent as the PSA sends it; omitted when not set.",
            "format": "double",
            "nullable": true
          },
          "expectedCloseDate": {
            "type": "string",
            "description": "Expected close date, yyyy-MM-dd; omitted when not set.",
            "nullable": true
          },
          "owner": {
            "type": "string",
            "description": "The owner's (sales rep's) name as last synced; omitted when none.",
            "nullable": true
          },
          "internal": {
            "type": "boolean",
            "description": "Whether client users never see the proposal: it, its status or its stage is marked internal."
          },
          "linkedInitiatives": {
            "type": "integer",
            "description": "Initiative items linked to the proposal that you can see.",
            "format": "int32"
          },
          "linkedPlanItems": {
            "type": "integer",
            "description": "Plan items linked to the proposal that you can see.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "One proposal, by names only, with how many initiative items and plan items its relationships show you. Never its\nproduct lines nor its custom values."
      },
      "ProposalStageRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The PSA's own stage id (a string).",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "The PSA's own stage name, as last synced.",
            "nullable": true
          },
          "isInternal": {
            "type": "boolean",
            "description": "Whether the stage is marked Internal in StrategyOverview's Proposals settings (the proposal's last-known mark when the stage is no longer in those settings). A proposal is hidden from client users in the application while its isInternal, status.isInternal or stage.isInternal is true. Only in the Full view, or when stage is named in fields.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The pipeline stage of a proposal: the PSA's own stage, named by the PSA. Absent on a proposal without a stage. No\noperation lists the stages, so the ids come from the proposals themselves."
      },
      "ProposalStatusRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The PSA's own status id (a string).",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "The PSA's own status name, as last synced.",
            "nullable": true
          },
          "isInternal": {
            "type": "boolean",
            "description": "Whether the status is marked Internal in StrategyOverview's Proposals settings (the proposal's last-known mark when the status is no longer in those settings). A proposal is hidden from client users in the application while its isInternal, status.isInternal or stage.isInternal is true. Only in the Full view, or when status is named in fields.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The status of a proposal: the PSA's own status, named by the PSA. What it means to StrategyOverview is the\nproposal's baseStatus and isClosed. No operation lists the statuses, so the ids come from the proposals themselves."
      },
      "QueryAssessmentInput": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and no data.",
            "nullable": true
          },
          "item": {
            "type": "string",
            "description": "Assessment item name, e.g. \"Backup\". An exact name wins; a term of 5 characters or fewer matches whole words only; several matches return disambiguation candidates and no data.",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "enum": [
                "status",
                "risk",
                "solution",
                "grade",
                "budget"
              ],
              "type": "string"
            },
            "description": "Item columns to return: status, risk, solution, grade, budget (one-time and recurring). Default: all. filledOut and graded are always returned.",
            "nullable": true
          },
          "graded": {
            "type": "boolean",
            "description": "true = only graded items (grade changed from the template default); false = only ungraded items (on the default grade, or with no grade at all). Needs client or item. Ignored when both client and item are set: the answer says whether that item is graded.",
            "nullable": true
          },
          "grade": {
            "type": "string",
            "description": "Grade name, e.g. \"Danger\": only items with a grade of that name. Needs client or item. Ignored when both client and item are set: the answer shows the item's own grade.",
            "nullable": true
          },
          "healthScoreMin": {
            "type": "integer",
            "description": "Only clients whose health score is at least this value (0-100); clients without a score are left out. Cannot be combined with item.",
            "format": "int32",
            "nullable": true
          },
          "healthScoreMax": {
            "type": "integer",
            "description": "Only clients whose health score is at most this value (0-100); clients without a score are left out. Cannot be combined with item.",
            "format": "int32",
            "nullable": true
          },
          "report": {
            "enum": [
              "latest",
              "latestDraft",
              "latestCompleted"
            ],
            "type": "string",
            "description": "Which report of each client is read: latest (default) = the newest report, the one listReports latestPerCompany returns (a client whose newest report is archived has no report in scope); latestDraft = the newest draft; latestCompleted = the newest completed report. Archived reports are never read."
          },
          "template": {
            "type": "string",
            "description": "Report template name, e.g. \"Quarterly Business Review\": report is picked among that template's reports only. Omit to pick across every template. Same name rules as client.",
            "nullable": true
          },
          "group": {
            "type": "string",
            "description": "Assessment group name on the client's report, e.g. \"Backup\": picks the copy of item in that group when the item name sits on the report more than once (without it such an item answers disambiguation candidates on group and no data). Only with client and item. Same name rules as client; no match = 404 with the nearest group names.",
            "nullable": true
          },
          "detail": {
            "enum": [
              "summary",
              "rows"
            ],
            "type": "string",
            "description": "summary (default) = counts and a compact answer; rows = the per-client or per-item rows behind them, paged by limit and offset."
          },
          "limit": {
            "type": "integer",
            "description": "Rows per page, 1 to 100 (default 25).",
            "format": "int32"
          },
          "offset": {
            "type": "integer",
            "description": "Rows to skip, a multiple of limit (default 0): pass the previous page's nextOffset.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Body of query_assessment: an assessment question asked by name. Every member is optional; which of client\nand item are set picks the answer: both = that item on that client's report, item only = that item across\nevery client, client only = that client's items, neither (or a health score filter) = client health."
      },
      "QueryAssessmentResource": {
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "singleItem",
              "itemAcrossClients",
              "clientItems",
              "clientHealth"
            ],
            "type": "string",
            "description": "Which question was answered: singleItem (client + item), itemAcrossClients (item), clientItems (client), clientHealth (neither, or a health score filter)."
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "A sentence to pass on with the answer (e.g. the client has no report, the item is not on its report, a blank item is not assessed).",
            "nullable": true
          },
          "renderAs": {
            "type": "string",
            "description": "Set when rows are returned: how to show them.",
            "nullable": true
          },
          "single": {
            "$ref": "#/components/schemas/AiSingleItemResource"
          },
          "clients": {
            "type": "integer",
            "description": "The clients you can see (itemAcrossClients, clientHealth).",
            "format": "int32",
            "nullable": true
          },
          "graded": {
            "type": "integer",
            "description": "Matching items whose grade was changed from the template default.",
            "format": "int32",
            "nullable": true
          },
          "ungraded": {
            "type": "integer",
            "description": "Matching items on the default grade or with no grade.",
            "format": "int32",
            "nullable": true
          },
          "noReport": {
            "type": "integer",
            "description": "Clients with no report in scope.",
            "format": "int32",
            "nullable": true
          },
          "itemNotOnReport": {
            "type": "integer",
            "description": "Clients whose report in scope does not carry the item.",
            "format": "int32",
            "nullable": true
          },
          "nothingGraded": {
            "type": "integer",
            "description": "clientHealth: clients whose report in scope has no item with a changed grade.",
            "format": "int32",
            "nullable": true
          },
          "byGrade": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiGradeCountResource"
            },
            "description": "Matching items per grade name, most frequent first.",
            "nullable": true
          },
          "clientRows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiItemAcrossClientsRowResource"
            },
            "description": "itemAcrossClients, detail=rows: one row per client carrying the item.",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiClientItemRowResource"
            },
            "description": "clientItems, detail=rows: the client's matching items in report order.",
            "nullable": true
          },
          "clientHealth": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiClientHealthRowResource"
            },
            "description": "clientHealth, detail=rows or a score filter: one row per scored client, highest score first.",
            "nullable": true
          },
          "withoutScore": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiWithoutScoreLineResource"
            },
            "description": "clientHealth rows: the clients without a health score, each with its reason (noReport, latestReportArchived, noScore), by name, paged with the rows' offset and limit.",
            "nullable": true
          },
          "withoutScoreTotal": {
            "type": "integer",
            "description": "With withoutScore: how many clients the whole list holds, whatever the page.",
            "format": "int32",
            "nullable": true
          },
          "withoutScoreTruncated": {
            "type": "boolean",
            "description": "With withoutScore: whether more clients follow this page (call again with offset + limit).",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "The size of the whole matched set (items, or the scored clients for clientHealth), whatever the page.",
            "format": "int64",
            "nullable": true
          },
          "truncated": {
            "type": "boolean",
            "description": "Rows only: whether more rows remain after this page.",
            "nullable": true
          },
          "nextOffset": {
            "type": "integer",
            "description": "Rows only: the offset of the next page; omitted on the last page.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of query_assessment. Only the members the answer kind produces are returned; when\ndisambiguation is set, nothing but kind and note comes with it."
      },
      "QueryAssessmentResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QueryAssessmentResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "QueryGoalsInput": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and no data. Omit for every client you can see.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label: Planned, On track, At risk or Done; same name rules as client. An unknown label is notFound listing every status.",
            "nullable": true
          },
          "owner": {
            "type": "string",
            "description": "The owner's full name, first and last; same name rules as client.",
            "nullable": true
          },
          "open": {
            "type": "boolean",
            "description": "true = goals not Done (a goal with no status included); false = Done goals.",
            "nullable": true
          },
          "targetYear": {
            "type": "integer",
            "description": "Calendar year of the target date, e.g. 2026.",
            "format": "int32",
            "nullable": true
          },
          "targetQuarter": {
            "type": "integer",
            "description": "Calendar quarter 1-4 of the target date (1 = January-March); needs targetYear.",
            "format": "int32",
            "nullable": true
          },
          "overdue": {
            "type": "boolean",
            "description": "true = target date before today (UTC) and not Done; false = every other goal.",
            "nullable": true
          },
          "detail": {
            "enum": [
              "summary",
              "rows"
            ],
            "type": "string",
            "description": "summary (default) = the matching goals and counts by status, by target quarter and by client, with the average progress of the tracked goals; rows = also the goals, by client then the module's order, paged by limit and offset (byClient is left out)."
          },
          "limit": {
            "type": "integer",
            "description": "Lines per page, 1 to 100: client lines on summary (default 15), goals on rows (default 25).",
            "format": "int32",
            "nullable": true
          },
          "offset": {
            "type": "integer",
            "description": "Lines to skip, a multiple of the page size in force (default 0): pass the previous page's nextOffset.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Body of query_goals: a Goals question, across every client the Goals module shows you or for one client by name.\nEvery member is optional; each filter narrows the goals the counts and the rows are all taken from."
      },
      "QueryGoalsResource": {
        "type": "object",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "A sentence to pass on with the answer.",
            "nullable": true
          },
          "renderAs": {
            "type": "string",
            "description": "Set when goals are returned: how to show them.",
            "nullable": true
          },
          "quarterBasis": {
            "type": "string",
            "description": "How quarters are counted: calendar (January-March is Q1).",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "The matching goals.",
            "format": "int32",
            "nullable": true
          },
          "byStatus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalCountLineResource"
            },
            "description": "One line per status, in the statuses' order (Planned, On track, At risk, Done), a status with no matching goal included at 0; a last \"(none)\" line counts the goals with no status or with a status id no option carries.",
            "nullable": true
          },
          "byTargetQuarter": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalCountLineResource"
            },
            "description": "One line per calendar quarter of the target date with matching goals (\"2026-Q1\"), the 12 most recent, most recent first, then \"unscheduled\" (no target date).",
            "nullable": true
          },
          "byTargetQuarterTruncated": {
            "type": "boolean",
            "description": "Whether byTargetQuarter was cut at 12 quarter lines (the oldest quarters are left out; unscheduled is always kept).",
            "nullable": true
          },
          "byClient": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalCountLineResource"
            },
            "description": "detail=summary with no client asked: one line per client with matching goals, most goals first, then by name; paged by limit and offset.",
            "nullable": true
          },
          "goals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalRowResource"
            },
            "description": "detail=rows: the matching goals, by client then the module's order.",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "The size of the paged list (client lines on summary, goals on rows), whatever the page.",
            "format": "int64",
            "nullable": true
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether more lines remain after this page.",
            "nullable": true
          },
          "nextOffset": {
            "type": "integer",
            "description": "The offset of the next page; omitted on the last page.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of query_goals. Only the members the answer produces are returned; when disambiguation is set, nothing\nbut note comes with it."
      },
      "QueryGoalsResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QueryGoalsResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "QueryInitiativesInput": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and no data. Omit for every client you can see.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label, e.g. \"In Progress\" (Identified, Scoping, Quoted, Proposed, Approved, In Progress, Completed, On Hold, Declined, Future); same name rules as client. An unknown label is notFound listing every status.",
            "nullable": true
          },
          "open": {
            "type": "boolean",
            "description": "true = only open items (status not a completed one: not Completed, not Declined); false = only items with a completed status. An item with no status matches neither.",
            "nullable": true
          },
          "tag": {
            "type": "string",
            "description": "Initiative tag name; same name rules as client.",
            "nullable": true
          },
          "assignee": {
            "type": "string",
            "description": "The assignee's full name, first and last; same name rules as client.",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Budget year of the item, e.g. 2026.",
            "format": "int32",
            "nullable": true
          },
          "quarter": {
            "type": "integer",
            "description": "Calendar quarter 1-4 of the item's budget month (1 = January-March); needs year.",
            "format": "int32",
            "nullable": true
          },
          "oneTimeBudgetMin": {
            "type": "number",
            "description": "Only items whose one-time budget is at least this amount; an item without one never matches.",
            "format": "double",
            "nullable": true
          },
          "detail": {
            "enum": [
              "summary",
              "rows"
            ],
            "type": "string",
            "description": "summary (default) = budget totals and counts by status, by quarter and by client; rows = also the items, by client then the module's order, paged by limit and offset (byClient is left out)."
          },
          "limit": {
            "type": "integer",
            "description": "Lines per page, 1 to 100: client lines on summary (default 15), items on rows (default 25).",
            "format": "int32",
            "nullable": true
          },
          "offset": {
            "type": "integer",
            "description": "Lines to skip, a multiple of the page size in force (default 0): pass the previous page's nextOffset.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Body of query_initiatives: an Initiatives question, across every client you can see or for one client by name.\nEvery member is optional; each filter narrows the items the counts, the budget totals and the rows are all taken\nfrom."
      },
      "QueryInitiativesResource": {
        "type": "object",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "A sentence to pass on with the answer (e.g. which members are not available to your role).",
            "nullable": true
          },
          "renderAs": {
            "type": "string",
            "description": "Set when items are returned: how to show them.",
            "nullable": true
          },
          "quarterBasis": {
            "type": "string",
            "description": "How quarters are counted: calendar (January-March is Q1).",
            "nullable": true
          },
          "totals": {
            "$ref": "#/components/schemas/InitiativeBudgetTotalsResource"
          },
          "byStatus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeCountLineResource"
            },
            "description": "One line per status with matching items, in the statuses' order; a last \"(none)\" line counts the items with no status. Omitted when your role may not see the status.",
            "nullable": true
          },
          "byQuarter": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeCountLineResource"
            },
            "description": "One line per calendar quarter with matching items (\"2026-Q1\"), the 12 most recent, most recent first, then \"unscheduled\" (no budget month or year).",
            "nullable": true
          },
          "byQuarterTruncated": {
            "type": "boolean",
            "description": "Whether byQuarter was cut at 12 quarter lines (the oldest quarters are left out; unscheduled is always kept).",
            "nullable": true
          },
          "byClient": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeCountLineResource"
            },
            "description": "detail=summary with no client asked: one line per client with matching items, most items first, then by name; paged by limit and offset. Omitted when your role may not see the company.",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeRowResource"
            },
            "description": "detail=rows: the matching items, by client then the module's order.",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "The size of the paged list (client lines on summary, items on rows), whatever the page.",
            "format": "int64",
            "nullable": true
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether more lines remain after this page.",
            "nullable": true
          },
          "nextOffset": {
            "type": "integer",
            "description": "The offset of the next page; omitted on the last page.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of query_initiatives. Only the members the answer produces are returned; when disambiguation is set,\nnothing but note comes with it."
      },
      "QueryInitiativesResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QueryInitiativesResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "QueryM365UsersInput": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and no data. Omit for every client you can see.",
            "nullable": true
          },
          "mfa": {
            "enum": [
              "any",
              "registered",
              "notRegistered"
            ],
            "type": "string",
            "description": "registered = users registered for MFA; notRegistered = users known not to be registered; any (default). A user whose MFA state the tenant does not report matches neither."
          },
          "isAdmin": {
            "type": "boolean",
            "description": "true = admins only (reported admin, or holding a directory role); false = users known to hold no admin role. A user whose directory roles were never read matches neither.",
            "nullable": true
          },
          "licensed": {
            "type": "boolean",
            "description": "true = users with at least one licence (an empty licence list means licences are assigned but their names were not resolved); false = users marked Unlicensed.",
            "nullable": true
          },
          "licenseContains": {
            "type": "string",
            "description": "Only users whose licence list contains this text, e.g. \"Business Premium\".",
            "nullable": true
          },
          "noSignInDays": {
            "type": "integer",
            "description": "Only users whose last sign-in is known and older than this many days (1 to 3650); a user with no reported sign-in never matches. Also the threshold of staleSignIn (default 90).",
            "format": "int32",
            "nullable": true
          },
          "passwordNeverExpires": {
            "type": "boolean",
            "description": "true = users whose password never expires; false = users whose password expires. A user with no reported password policy matches neither.",
            "nullable": true
          },
          "userType": {
            "enum": [
              "any",
              "member",
              "guest"
            ],
            "type": "string",
            "description": "member = members only; guest = guests only; any (default)."
          },
          "includeBlocked": {
            "type": "boolean",
            "description": "true = also count and list accounts whose sign-in is blocked; they are left out by default. Deleted users and contacts are never counted."
          },
          "detail": {
            "enum": [
              "summary",
              "rows"
            ],
            "type": "string",
            "description": "summary (default) = one line of counts per client (most admins without MFA first) and the totals; rows = the matching users, paged by limit and offset."
          },
          "limit": {
            "type": "integer",
            "description": "Lines per page, 1 to 100: client lines on summary (default 15), users on rows (default 25).",
            "format": "int32",
            "nullable": true
          },
          "offset": {
            "type": "integer",
            "description": "Lines to skip, a multiple of limit (default 0): pass the previous page's nextOffset.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Body of query_m365_users: a Microsoft 365 user posture question, across every client you can see or for\none client by name. Every member is optional; each filter narrows the users both the counts and the rows\nare taken from."
      },
      "QueryM365UsersResource": {
        "type": "object",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "A sentence to pass on with the answer (e.g. the client has no synced Microsoft 365 users).",
            "nullable": true
          },
          "renderAs": {
            "type": "string",
            "description": "Set when rows are returned: how to show them.",
            "nullable": true
          },
          "clients": {
            "type": "integer",
            "description": "The clients in scope that have synced Microsoft 365 users, whatever the filters: the population clientsWithoutData is the rest of.",
            "format": "int32",
            "nullable": true
          },
          "clientsMatched": {
            "type": "integer",
            "description": "The clients with at least one user matching every filter: the client lines byClient pages. Can be below clients even unfiltered: deleted, contact and (by default) blocked users never count.",
            "format": "int32",
            "nullable": true
          },
          "clientsWithoutData": {
            "type": "integer",
            "description": "The clients in scope with no synced Microsoft 365 users (not connected or never synced).",
            "format": "int32",
            "nullable": true
          },
          "byClient": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/M365ClientPostureResource"
            },
            "description": "detail=summary: one line per client with matching users, most admins without MFA first, then most users without MFA; paged by limit and offset.",
            "nullable": true
          },
          "totals": {
            "$ref": "#/components/schemas/M365ClientPostureResource"
          },
          "clientsWithoutSyncDate": {
            "type": "integer",
            "description": "The clients counted in totals that have no recorded Microsoft 365 sync date; totals.dataAsOf is the oldest date of the others.",
            "format": "int32",
            "nullable": true
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/M365UserRowResource"
            },
            "description": "detail=rows: the matching users, by client then display name.",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "The size of the paged list (client lines on summary, users on rows), whatever the page.",
            "format": "int64",
            "nullable": true
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether more lines remain after this page.",
            "nullable": true
          },
          "nextOffset": {
            "type": "integer",
            "description": "The offset of the next page; omitted on the last page.",
            "format": "int32",
            "nullable": true
          },
          "cautions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Fixed reading notes to pass on with the numbers: what MFA means here, what the unknown counts are, and that the data is as of each client's last sync.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of query_m365_users. Only the members the answer produces are returned; when disambiguation\nis set, nothing but note comes with it."
      },
      "QueryM365UsersResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QueryM365UsersResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "QueryPlansInput": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and no data. Omit for every client you can see.",
            "nullable": true
          },
          "plan": {
            "type": "string",
            "description": "Plan name, for when a client has several plans; same name rules as client, among the plans you can open (of that client when client is set). Candidates carry the client as their hint.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label, e.g. \"In Progress\"; every plan has its own status list, so the label is matched on each plan. Same name rules as client; an unknown label is notFound listing the statuses of the plans in scope.",
            "nullable": true
          },
          "open": {
            "type": "boolean",
            "description": "true = only open items (the item's status is not a completed one on its plan); false = only items with a completed status. An item with no status matches neither.",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "The item's Year column, e.g. 2026.",
            "format": "int32",
            "nullable": true
          },
          "quarter": {
            "type": "integer",
            "description": "Calendar quarter 1-4 of the item's Month column (1 = January-March); needs year.",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "enum": [
              "summary",
              "rows"
            ],
            "type": "string",
            "description": "summary (default) = budget totals and counts by status, by quarter and by client; rows = also the items, by client, plan and the plan's order, paged by limit and offset (byClient is left out)."
          },
          "limit": {
            "type": "integer",
            "description": "Lines per page, 1 to 100: client lines on summary (default 15), items on rows (default 25).",
            "format": "int32",
            "nullable": true
          },
          "offset": {
            "type": "integer",
            "description": "Lines to skip, a multiple of the page size in force (default 0): pass the previous page's nextOffset.",
            "format": "int32"
          },
          "itemId": {
            "type": "integer",
            "description": "Only this item, by the id a row carries; use it with detail=rows to get the item's row (and, with includeNotes, its notes). 404 when it is not among the plans you can read.",
            "format": "int32",
            "nullable": true
          },
          "includeNotes": {
            "type": "boolean",
            "description": "true = each row also carries the item's notes (its description, HTML), cut to 1000 characters on a page; with itemId the whole note up to 100000. Needs detail=rows."
          }
        },
        "additionalProperties": false,
        "description": "Body of query_plans: a Plans question, across every client you can see, for one client or for one plan by name.\nEvery member is optional; each filter narrows the plan items the counts, the budget totals and the rows are all taken\nfrom."
      },
      "QueryPlansResource": {
        "type": "object",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "A sentence to pass on with the answer.",
            "nullable": true
          },
          "renderAs": {
            "type": "string",
            "description": "Set when items are returned: how to show them.",
            "nullable": true
          },
          "quarterBasis": {
            "type": "string",
            "description": "How quarters are counted: calendar (January-March is Q1).",
            "nullable": true
          },
          "totals": {
            "$ref": "#/components/schemas/PlanBudgetTotalsResource"
          },
          "byStatus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanCountLineResource"
            },
            "description": "One line per status label with matching items (the same label on several plans is one line), by the label's order on the plans; a last \"(none)\" line counts the items with no status.",
            "nullable": true
          },
          "byQuarter": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanCountLineResource"
            },
            "description": "One line per calendar quarter with matching items (\"2026-Q1\"), the 12 most recent, most recent first, then \"unscheduled\" (no month, no year or a year outside 1900-2200).",
            "nullable": true
          },
          "byQuarterTruncated": {
            "type": "boolean",
            "description": "Whether byQuarter was cut at 12 quarter lines (the oldest quarters are left out; unscheduled is always kept).",
            "nullable": true
          },
          "byClient": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanCountLineResource"
            },
            "description": "detail=summary with no client and no plan asked: one line per client with matching items, most items first, then by name; paged by limit and offset.",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanItemRowResource"
            },
            "description": "detail=rows: the matching items, by client, then plan, then the plan's order.",
            "nullable": true
          },
          "unparsedBudgets": {
            "type": "integer",
            "description": "How many one-time budget and recurring total values of the matching items are not numbers: they are left out of the sums, never guessed.",
            "format": "int32",
            "nullable": true
          },
          "nonCalendarYear": {
            "type": "integer",
            "description": "Items (matching every filter but year and quarter) whose year is not a calendar year, e.g. 3: never mapped to one, they are unscheduled and match no year or quarter filter; note says so when any.",
            "format": "int32",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "The size of the paged list (client lines on summary, items on rows), whatever the page.",
            "format": "int64",
            "nullable": true
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether more lines remain after this page.",
            "nullable": true
          },
          "nextOffset": {
            "type": "integer",
            "description": "The offset of the next page; omitted on the last page.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of query_plans. Only the members the answer produces are returned; when disambiguation is set, nothing but\nnote comes with it."
      },
      "QueryPlansResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QueryPlansResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "QueryProjectsInput": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and no data. Omit for every client you can see.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "The PSA status name, e.g. \"In Progress\"; same name rules as client; statuses of one name count as one. An unknown name is notFound listing the statuses of the projects in scope.",
            "nullable": true
          },
          "board": {
            "type": "string",
            "description": "Project board name; same name rules as client; boards of one name count as one. \"(none)\" selects the projects whose board has no name (byBoard's \"(none)\" line). An unknown name is notFound listing the boards of the projects in scope.",
            "nullable": true
          },
          "manager": {
            "type": "string",
            "description": "The project manager's name as the PSA sends it; same name rules as client.",
            "nullable": true
          },
          "open": {
            "type": "boolean",
            "description": "true = projects whose status does not mean Closed (On hold included); false = Closed projects.",
            "nullable": true
          },
          "internal": {
            "type": "boolean",
            "description": "true = projects hidden from client users: isInternal is true or inheritedInternalSources is not empty (an internal status, type or board); false = the others.",
            "nullable": true
          },
          "synced": {
            "type": "boolean",
            "description": "true = projects synced from the PSA now (linkStatus mapped), the only ones that take new links; false = the others: orphan (was synced, no longer found in the PSA), wasMapped (was synced, then cut from the sync by an integration-settings change) and none (never synced).",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Calendar year of the estimated completion date, e.g. 2026.",
            "format": "int32",
            "nullable": true
          },
          "quarter": {
            "type": "integer",
            "description": "Calendar quarter 1-4 of the estimated completion date (1 = January-March); needs year.",
            "format": "int32",
            "nullable": true
          },
          "overdue": {
            "type": "boolean",
            "description": "true = estimated completion before today (UTC) and not Closed; false = every other project.",
            "nullable": true
          },
          "detail": {
            "enum": [
              "summary",
              "rows"
            ],
            "type": "string",
            "description": "summary (default) = the matching projects and counts by status, by board and by client; rows = also the projects, by client then name, paged by limit and offset (byClient is left out)."
          },
          "limit": {
            "type": "integer",
            "description": "Lines per page, 1 to 100: client lines on summary (default 15), projects on rows (default 25).",
            "format": "int32",
            "nullable": true
          },
          "offset": {
            "type": "integer",
            "description": "Lines to skip, a multiple of the page size in force (default 0): pass the previous page's nextOffset.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Body of query_projects: a Projects question, across every client the Projects module shows you or for one client by\nname. Every member is optional; each filter narrows the projects the counts and the rows are all taken from."
      },
      "QueryProjectsResource": {
        "type": "object",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "A sentence to pass on with the answer.",
            "nullable": true
          },
          "renderAs": {
            "type": "string",
            "description": "Set when projects are returned: how to show them.",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "The matching projects.",
            "format": "int32",
            "nullable": true
          },
          "byStatus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectCountLineResource"
            },
            "description": "One line per status meaning, always Open, On hold, Closed in that order, a meaning with no matching project included at 0.",
            "nullable": true
          },
          "byBoard": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectCountLineResource"
            },
            "description": "One line per project board with matching projects (boards of one name together), most projects first, then by name; the 15 largest.",
            "nullable": true
          },
          "byBoardTruncated": {
            "type": "boolean",
            "description": "Whether byBoard was cut at 15 board lines.",
            "nullable": true
          },
          "byClient": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectCountLineResource"
            },
            "description": "detail=summary with no client asked: one line per client with matching projects, most projects first, then by name; paged by limit and offset.",
            "nullable": true
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectRowResource"
            },
            "description": "detail=rows: the matching projects, by client then project name.",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "The size of the paged list (client lines on summary, projects on rows), whatever the page.",
            "format": "int64",
            "nullable": true
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether more lines remain after this page.",
            "nullable": true
          },
          "nextOffset": {
            "type": "integer",
            "description": "The offset of the next page; omitted on the last page.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of query_projects. Only the members the answer produces are returned; when disambiguation is set, nothing\nbut note comes with it."
      },
      "QueryProjectsResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QueryProjectsResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "QueryProposalsInput": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and no data. Omit for every client you can see.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "The PSA status name, e.g. \"New\", matched exactly (case aside); statuses of one name count as one. An unknown name is notFound listing the statuses of the proposals in scope.",
            "nullable": true
          },
          "stage": {
            "type": "string",
            "description": "The PSA stage name, e.g. \"Prospect\", matched exactly (case aside); stages of one name count as one. \"(none)\" selects the proposals without a stage (byStage's \"(none)\" line). An unknown name is notFound listing the stages of the proposals in scope.",
            "nullable": true
          },
          "owner": {
            "type": "string",
            "description": "The owner's (sales rep's) name as the PSA sends it, matched exactly (case aside). An unknown name is notFound with the nearest names.",
            "nullable": true
          },
          "open": {
            "type": "boolean",
            "description": "true = proposals whose status is not a closed one, whatever their base status (this is not the Open base status); false = the closed ones.",
            "nullable": true
          },
          "internal": {
            "type": "boolean",
            "description": "true = proposals hidden from client users: the proposal, its status or its stage is marked internal; false = the others.",
            "nullable": true
          },
          "overdue": {
            "type": "boolean",
            "description": "true = expected close date before today (UTC) and not closed; false = every other proposal (one without an expected close date included).",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Calendar year of the expected close date, e.g. 2026.",
            "format": "int32",
            "nullable": true
          },
          "quarter": {
            "type": "integer",
            "description": "Calendar quarter 1-4 of the expected close date (1 = January-March); needs year.",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "enum": [
              "summary",
              "rows"
            ],
            "type": "string",
            "description": "summary (default) = the matching proposals with their amount total and counts by base status, by stage and by client, each with its amount sum; rows = also the proposals, by client then name, paged by limit and offset (byClient is left out)."
          },
          "limit": {
            "type": "integer",
            "description": "Lines per page, 1 to 100: client lines on summary (default 15), proposals on rows (default 25).",
            "format": "int32",
            "nullable": true
          },
          "offset": {
            "type": "integer",
            "description": "Lines to skip, a multiple of the page size in force (default 0): pass the previous page's nextOffset.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Body of query_proposals: a Proposals question (a proposal is a PSA opportunity), across every client the Proposals\nmodule shows you or for one client by name. Every member is optional; each filter narrows the proposals the counts and\nthe rows are all taken from."
      },
      "QueryProposalsResource": {
        "type": "object",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "A sentence to pass on with the answer.",
            "nullable": true
          },
          "renderAs": {
            "type": "string",
            "description": "Set when proposals are returned: how to show them.",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "The matching proposals.",
            "format": "int32",
            "nullable": true
          },
          "totalAmount": {
            "type": "number",
            "description": "The sum of the matching proposals' amounts, a missing amount counted as 0; no currency is carried.",
            "format": "double",
            "nullable": true
          },
          "byBaseStatus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProposalCountLineResource"
            },
            "description": "One line per base status (what the PSA status means to StrategyOverview), always Open, Accepted, Declined in that order, a base status with no matching proposal included at 0; a last \"(none)\" line counts the proposals of no known base status, when there are any. The Open line counts the proposals with no won or lost outcome, whether or not their status is a closed one; for the proposals that are not closed, ask open=true.",
            "nullable": true
          },
          "byStage": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProposalCountLineResource"
            },
            "description": "One line per stage name with matching proposals (stages of one name together), \"(none)\" for the proposals without a stage, most proposals first, then by name; the 15 largest.",
            "nullable": true
          },
          "byStageTruncated": {
            "type": "boolean",
            "description": "Whether byStage was cut at 15 stage lines (the smallest stages are left out).",
            "nullable": true
          },
          "byClient": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProposalCountLineResource"
            },
            "description": "detail=summary with no client asked: one line per client with matching proposals, most proposals first, then by name; paged by limit and offset.",
            "nullable": true
          },
          "proposals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProposalRowResource"
            },
            "description": "detail=rows: the matching proposals, by client then name.",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "The size of the paged list (client lines on summary, proposals on rows), whatever the page.",
            "format": "int64",
            "nullable": true
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether more lines remain after this page.",
            "nullable": true
          },
          "nextOffset": {
            "type": "integer",
            "description": "The offset of the next page; omitted on the last page.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of query_proposals. Only the members the answer produces are returned; when disambiguation is set, nothing\nbut note comes with it. Amounts are summed as the PSA sends them: no currency is carried."
      },
      "QueryProposalsResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QueryProposalsResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "QueryScheduleInput": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and no data. Omit for every client you can see. A client asked always lists its lines, one per template.",
            "nullable": true
          },
          "template": {
            "type": "string",
            "description": "Report template name, e.g. \"Quarterly Business Review\"; same name rules as client. Omit for every template you can see.",
            "nullable": true
          },
          "primaryUser": {
            "type": "string",
            "description": "The primary user's (vCIO's) full name, first and last; same name rules as client. Only the client schedules this user is the primary user of. \"(no primary user)\" = only the client schedules with no primary user set.",
            "nullable": true
          },
          "status": {
            "enum": [
              "any",
              "overdue",
              "dueThisMonth",
              "onTrack",
              "done"
            ],
            "type": "string",
            "description": "overdue, dueThisMonth, onTrack or done = only the client schedules with that status, in the counts and the lines; any (default)."
          },
          "year": {
            "type": "integer",
            "description": "Calendar year, 2000 to 2100 (default: the current year, UTC). In a past year every target has passed; in a future year none has.",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "enum": [
              "summary",
              "rows"
            ],
            "type": "string",
            "description": "summary (default) = the counts and one line per primary user; rows = also one line per client schedule, worst status first, paged by limit and offset."
          },
          "limit": {
            "type": "integer",
            "description": "Lines per page, 1 to 100: a client's lines on summary (default 15), lines on rows (default 25).",
            "format": "int32",
            "nullable": true
          },
          "offset": {
            "type": "integer",
            "description": "Lines to skip, a multiple of the page size in force (default 0): pass the previous page's nextOffset.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Body of query_schedule: a report schedule question, across every client schedule you can see (a client on the\nschedule and a report template) or for one client, one template or one primary user (vCIO) by name. Every\nmember is optional; each one set narrows the client schedules both the counts and the lines are taken from."
      },
      "QueryScheduleResource": {
        "type": "object",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "A sentence to pass on with the answer (e.g. the client has no scheduled reports this year, or how many client schedules have 0 reports per year).",
            "nullable": true
          },
          "renderAs": {
            "type": "string",
            "description": "Set when lines are returned: how to show them.",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "The calendar year the answer is for.",
            "format": "int32",
            "nullable": true
          },
          "companies": {
            "type": "integer",
            "description": "The clients on the schedule in scope with at least one scheduled client schedule (a schedule for the year, or a report of the template this year or last year): the population notScheduled is the rest of. Not narrowed by status or primaryUser.",
            "format": "int32",
            "nullable": true
          },
          "matchedCompanies": {
            "type": "integer",
            "description": "The clients of the client schedules counted, after the status and primaryUser filters (= companies when neither is set).",
            "format": "int32",
            "nullable": true
          },
          "schedules": {
            "type": "integer",
            "description": "The client schedules counted (a client and a template), after the status and primaryUser filters: overdue + dueThisMonth + onTrack + done = schedules (totalCount when lines are listed); a client with several templates counts once per template, so schedules can exceed matchedCompanies.",
            "format": "int32",
            "nullable": true
          },
          "notScheduled": {
            "type": "integer",
            "description": "The clients on the schedule in scope with no scheduled client schedule: no schedule for the year and no report of a template in scope this year or last year. Not narrowed by status or primaryUser.",
            "format": "int32",
            "nullable": true
          },
          "overdue": {
            "type": "integer",
            "description": "Client schedules with a target month before the current month not covered: fewer reports delivered so far (the current month included) than target months passed (before the current month).",
            "format": "int32",
            "nullable": true
          },
          "dueThisMonth": {
            "type": "integer",
            "description": "Client schedules of the current year whose current month is a target with no report delivered this month, and nothing missed before it.",
            "format": "int32",
            "nullable": true
          },
          "onTrack": {
            "type": "integer",
            "description": "Client schedules with every target so far delivered and nothing due this month, or with 0 reports per year.",
            "format": "int32",
            "nullable": true
          },
          "done": {
            "type": "integer",
            "description": "Client schedules with at least as many distinct delivered months as reports per year.",
            "format": "int32",
            "nullable": true
          },
          "byPrimaryUser": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleByUserLineResource"
            },
            "description": "Up to 25 lines, one per primary user of the client schedules counted, most overdue first, then by name; the line with primaryUser \"(no primary user)\" counts the client schedules with none set.",
            "nullable": true
          },
          "byPrimaryUserTruncated": {
            "type": "boolean",
            "description": "Whether byPrimaryUser was cut at 25 lines (the least overdue primary users are left out).",
            "nullable": true
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleCompanyLineResource"
            },
            "description": "detail=rows, or whenever client is asked: the client schedules, worst status first, paged by limit and offset.",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "The number of lines (scheduled client schedules), whatever the page.",
            "format": "int64",
            "nullable": true
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether more lines remain after this page.",
            "nullable": true
          },
          "nextOffset": {
            "type": "integer",
            "description": "The offset of the next page; omitted on the last page.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of query_schedule. Only the members the answer produces are returned; when disambiguation is set,\nnothing but note comes with it."
      },
      "QueryScheduleResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QueryScheduleResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "QueryTechnologyInput": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and no data. Omit for every client you can see.",
            "nullable": true
          },
          "category": {
            "type": "string",
            "description": "A technology type name (\"Workstations\", every group attached to it from any source), else a group label, else a device word (\"laptops\", \"firewall\"): the groups whose labels are that kind of device. Resolved among the groups holding items you can see (of the client, when set); several matches return disambiguation candidates.",
            "nullable": true
          },
          "osContains": {
            "type": "string",
            "description": "Part of the operating system as the OS column shows it, e.g. \"Windows 10\"; the spellings of one OS family match each other (\"Windows 10\" / \"Win 10\", \"Mac OS X\" / \"macOS\"; Ubuntu, Debian, CentOS, Fedora, RHEL / Red Hat, SUSE, Rocky, AlmaLinux under \"Linux\"), a version number only as a whole number. Items with no OS are counted in filterValueUnknown; when no OS in scope matches, osCandidates lists the OS values in scope.",
            "nullable": true
          },
          "minAgeYears": {
            "type": "integer",
            "description": "At least this many years old: the Age column as the app shows it (rounded up to a tenth), else the age of the purchase date.",
            "format": "int32",
            "nullable": true
          },
          "warrantyExpiresBefore": {
            "type": "string",
            "description": "The warranty expiration date is before this day (yyyy-MM-dd).",
            "format": "date-time",
            "nullable": true
          },
          "warrantyExpired": {
            "type": "boolean",
            "description": "true = the warranty has expired (its date is before today, UTC); false = it has not.",
            "nullable": true
          },
          "purchasedAfter": {
            "type": "string",
            "description": "The purchase date is on or after this day (yyyy-MM-dd).",
            "format": "date-time",
            "nullable": true
          },
          "purchasedBefore": {
            "type": "string",
            "description": "The purchase date is before this day (yyyy-MM-dd).",
            "format": "date-time",
            "nullable": true
          },
          "grade": {
            "type": "string",
            "description": "Technology grade name, e.g. \"Danger\"; resolved among the grades the items in scope carry.",
            "nullable": true
          },
          "source": {
            "type": "string",
            "description": "Integration name, for when the matched groups come from several sources (the same devices may be synced twice). detail=rows asks for it when they do.",
            "nullable": true
          },
          "groupBy": {
            "enum": [
              "none",
              "site",
              "client",
              "category",
              "os"
            ],
            "type": "string",
            "description": "none (default) = one line per technology group when several match; category = per technology type (else group label); site, client or os = per site, client or operating system."
          },
          "detail": {
            "enum": [
              "summary",
              "rows"
            ],
            "type": "string",
            "description": "summary (default) = counts; rows = also the items (name, OS, age, purchase, warranty, grade, make, model, last user), by client, category and name, paged by limit and offset."
          },
          "limit": {
            "type": "integer",
            "description": "Lines per page, 1 to 100: client lines with groupBy=client on summary (default 15), items on rows (default 25).",
            "format": "int32",
            "nullable": true
          },
          "offset": {
            "type": "integer",
            "description": "Lines to skip, a multiple of the page size in force (default 0): pass the previous page's nextOffset.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Body of query_technology: a technology (devices and other tracked items) question, across every client you can see or\nfor one client by name. Every member is optional; each filter narrows the items the counts and the rows are taken\nfrom."
      },
      "QueryTechnologyResource": {
        "type": "object",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "A sentence to pass on with the answer.",
            "nullable": true
          },
          "renderAs": {
            "type": "string",
            "description": "Set when items are returned: how to show them.",
            "nullable": true
          },
          "matched": {
            "type": "integer",
            "description": "How many items match every filter (inactive and unmapped items are hidden, as in the application).",
            "format": "int32",
            "nullable": true
          },
          "filterValueUnknown": {
            "type": "integer",
            "description": "Set when an OS, age, warranty or purchase-date filter is asked: the items left out because that value is blank on them, never guessed.",
            "format": "int32",
            "nullable": true
          },
          "osCandidates": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Set when osContains matches no OS in scope (matched is then 0): the OS values of the items in scope, most frequent first, at most 10; call again with one of them.",
            "nullable": true
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyCountLineResource"
            },
            "description": "One line per technology group (when several match and no groupBy is asked), category, site or OS: most items first, at most 25, then a \"(none)\" line for the items with no site or OS.",
            "nullable": true
          },
          "groupsTruncated": {
            "type": "boolean",
            "description": "Whether groups was cut at 25 lines (the \"(none)\" line is always kept).",
            "nullable": true
          },
          "byClient": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyCountLineResource"
            },
            "description": "groupBy=client on summary: one line per client with matching items, most items first, then by name; paged by limit and offset.",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyItemRowResource"
            },
            "description": "detail=rows: the matching items, by client, then category, then name.",
            "nullable": true
          },
          "droppedColumns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "detail=rows: the item members that are blank on every matching item (not only on this page), so they are never shown.",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "The size of the paged list (client lines with groupBy=client on summary, items on rows), whatever the page.",
            "format": "int64",
            "nullable": true
          },
          "truncated": {
            "type": "boolean",
            "description": "Whether more lines remain after this page.",
            "nullable": true
          },
          "nextOffset": {
            "type": "integer",
            "description": "The offset of the next page; omitted on the last page.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of query_technology. Only the members the answer produces are returned; when disambiguation is set, nothing\nbut note comes with it."
      },
      "QueryTechnologyResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/QueryTechnologyResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "RelatedEntityResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the related entity (see the resource's list endpoint).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the related entity.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A related lookup entity (company type or group) carrying the id needed to round-trip to its\nown list endpoint, alongside the display name."
      },
      "RelationshipLinkItemError": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id from the request that was not linked or unlinked.",
            "format": "int32"
          },
          "code": {
            "enum": [
              "validationFailed",
              "notFound",
              "accessDenied",
              "internalError",
              "idempotencyKeyReused",
              "requestInProgress",
              "unauthenticated",
              "notImplemented",
              "rateLimited"
            ],
            "type": "string",
            "description": "Stable, documented error codes for the external API. Values are CONTRACT once shipped\n(rename = breaking change). New values are added as real cases appear; every addition must\nland in the External API Guide's error-code catalog in the same change."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation of the failure, naming the records involved.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One refused id in a relationship link or unlink response: the id, a machine-readable code (the shared\nExternalErrorCode, so it matches the single-resource error contract) and a message that names the records."
      },
      "ReportAssessmentColumnModeSettings": {
        "type": "object",
        "properties": {
          "width": {
            "type": "string",
            "description": "Column width in this mode (CSS value, for example \"70px\"), or empty.",
            "nullable": true
          },
          "isShow": {
            "type": "boolean",
            "description": "Whether the column is shown in this mode."
          }
        },
        "additionalProperties": false,
        "description": "Per-mode display settings of an assessment column (build / display / presentation)."
      },
      "ReportAssessmentColumnResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the report column.",
            "format": "int32",
            "nullable": true
          },
          "templateColumnId": {
            "type": "integer",
            "description": "Id of the template column this report column was created from, or null.",
            "format": "int32",
            "nullable": true
          },
          "columnName": {
            "type": "string",
            "description": "System name of the column.",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "Display label of the column.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the column.",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/ReportAssessmentColumnTypeRef"
          },
          "style": {
            "type": "string",
            "description": "Style of the column, or empty.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the column.",
            "format": "double",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the column is active.",
            "nullable": true
          },
          "isRequired": {
            "type": "boolean",
            "description": "Whether an item value is required for this column.",
            "nullable": true
          },
          "isRecurring": {
            "type": "boolean",
            "description": "Whether the column carries the recurring flag.",
            "nullable": true
          },
          "isExcel": {
            "type": "boolean",
            "description": "Whether the column is included in Excel exports.",
            "nullable": true
          },
          "buildSettings": {
            "$ref": "#/components/schemas/ReportAssessmentColumnModeSettings"
          },
          "displaySettings": {
            "$ref": "#/components/schemas/ReportAssessmentColumnModeSettings"
          },
          "presentationSettings": {
            "$ref": "#/components/schemas/ReportAssessmentColumnModeSettings"
          }
        },
        "additionalProperties": false,
        "description": "An assessment column of a report. Both ids are always present and named: id is the REPORT\ncolumn id, templateColumnId is the id of the template column it was created from — the two id\nspaces never share a field."
      },
      "ReportAssessmentColumnResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportAssessmentColumnResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "ReportAssessmentColumnResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportAssessmentColumnResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "ReportAssessmentColumnTypeRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the column type.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the column type (for example Text, Status, OneTimeBudget).",
            "nullable": true
          },
          "isEditable": {
            "type": "boolean",
            "description": "Whether item values of this column are editable."
          }
        },
        "additionalProperties": false,
        "description": "The type of an assessment column. isEditable tells whether item values of this column can be\nedited (custom text columns) as opposed to system-calculated ones."
      },
      "ReportAssessmentCustomValueResource": {
        "type": "object",
        "properties": {
          "templateColumnId": {
            "type": "integer",
            "description": "Id of the template column the value belongs to — the key accepted by /customValues on patch.",
            "format": "int32",
            "nullable": true
          },
          "reportColumnId": {
            "type": "integer",
            "description": "Id of the report column the value belongs to.",
            "format": "int32",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "The stored value.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A custom column value of an assessment item. Both column ids are always present and named so\nthe id spaces never mix: templateColumnId is what patchReportAssessmentItem accepts under\n/customValues, reportColumnId matches the id of listReportAssessmentColumns."
      },
      "ReportAssessmentGradeResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the grade (template grade id, accepted by /templateGradeId on item patch).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the grade.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the grade.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the grade.",
            "nullable": true
          },
          "legend": {
            "type": "string",
            "description": "Legend text of the grade.",
            "nullable": true
          },
          "isHealth": {
            "type": "boolean",
            "description": "Whether the grade counts as healthy."
          },
          "includeInHealth": {
            "type": "boolean",
            "description": "Whether items with this grade are included in health score calculations."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the default grade."
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the grade.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "A grade available to the assessment of a report — the report template's grade set. The id is\nthe template grade id, which is exactly what patchReportAssessmentItem accepts under\n/templateGradeId."
      },
      "ReportAssessmentGradeResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportAssessmentGradeResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "ReportAssessmentGroupHealthResource": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "integer",
            "description": "Unique identifier of the group.",
            "format": "int32"
          },
          "health": {
            "type": "integer",
            "description": "Health score of the group, or null when it has no graded items.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The health score of one assessment group."
      },
      "ReportAssessmentGroupHealthResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportAssessmentGroupHealthResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "ReportAssessmentGroupRowResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the group. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name of the group.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the group.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the group is active.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the group within the report.",
            "format": "double",
            "nullable": true
          },
          "healthScore": {
            "type": "integer",
            "description": "Health score of the group, or null.",
            "format": "int32",
            "nullable": true
          },
          "templateGroupId": {
            "type": "integer",
            "description": "Id of the template group this group was created from; null when the group has none (added by hand, or its template group was deleted).",
            "format": "int32",
            "nullable": true
          },
          "isManualAdded": {
            "type": "boolean",
            "description": "Whether the group was added manually (not from the template).",
            "nullable": true
          },
          "markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportRelatedRef"
            },
            "description": "Markets of the group (id + name).",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportRelatedRef"
            },
            "description": "Tags of the group (id + name).",
            "nullable": true
          },
          "itemsCount": {
            "type": "integer",
            "description": "Number of assessment items in the group — use it to size listReportAssessmentItems reads.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An assessment group of a report as a paged list row: the group's own values plus the count of\nits items — never the items themselves (listReportAssessmentItems serves those). Value members\nare nullable so a field omitted by the fields/view projection disappears from the JSON."
      },
      "ReportAssessmentGroupRowResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportAssessmentGroupRowResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "ReportAssessmentItemGradeResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the item's grade row.",
            "format": "int32"
          },
          "templateGradeId": {
            "type": "integer",
            "description": "Id of the template grade this grade was copied from — the id accepted by /templateGradeId on patch.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name of the grade.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the grade.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the grade.",
            "nullable": true
          },
          "legend": {
            "type": "string",
            "description": "Legend text of the grade.",
            "nullable": true
          },
          "isHealth": {
            "type": "boolean",
            "description": "Whether the grade counts as healthy."
          },
          "includeInHealth": {
            "type": "boolean",
            "description": "Whether items with this grade are included in health score calculations."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the default grade."
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the grade.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "The grade set on an assessment item. id identifies the item's own grade row; templateGradeId\nidentifies the grade in the report template's grade set — the value listReportAssessmentGrades\nreturns and patchReportAssessmentItem accepts."
      },
      "ReportAssessmentItemResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the item. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name of the item.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the item.",
            "nullable": true
          },
          "healthStandard": {
            "type": "string",
            "description": "Health standard text of the item.",
            "nullable": true
          },
          "referenceInstructions": {
            "type": "string",
            "description": "Reference instructions of the item, copied from the template item when the report was created. Read-only.",
            "nullable": true
          },
          "referenceLink": {
            "type": "string",
            "description": "Reference link of the item, copied from the template item when the report was created. Read-only.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status value of the item.",
            "nullable": true
          },
          "risk": {
            "type": "string",
            "description": "Risk value of the item.",
            "nullable": true
          },
          "solution": {
            "type": "string",
            "description": "Solution value of the item.",
            "nullable": true
          },
          "month": {
            "type": "integer",
            "description": "Planned month (1-12), or null.",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Planned year, or null.",
            "format": "int32",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "string",
            "description": "One-time budget as entered, or null.",
            "nullable": true
          },
          "recurringBudget": {
            "type": "string",
            "description": "Recurring budget as entered, or null.",
            "nullable": true
          },
          "recurringPeriod": {
            "type": "integer",
            "description": "Recurring period in months, or null.",
            "format": "int32",
            "nullable": true
          },
          "quantity": {
            "type": "string",
            "description": "Quantity as entered, or null.",
            "nullable": true
          },
          "recurringTotal": {
            "type": "number",
            "description": "Recurring budget times quantity, recalculated on every patch, or null.",
            "format": "double",
            "nullable": true
          },
          "weight": {
            "type": "integer",
            "description": "Health weight of the item.",
            "format": "int32",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Effective date, or null.",
            "format": "date-time",
            "nullable": true
          },
          "cancellationDate": {
            "type": "string",
            "description": "Cancellation date, or null.",
            "format": "date-time",
            "nullable": true
          },
          "grade": {
            "$ref": "#/components/schemas/ReportAssessmentItemGradeResource"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportRelatedRef"
            },
            "description": "Tags of the item (id + name).",
            "nullable": true
          },
          "site": {
            "$ref": "#/components/schemas/ReportRelatedRef"
          },
          "customValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportAssessmentCustomValueResource"
            },
            "description": "Custom column values, each carrying both column ids.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the item within its group.",
            "format": "double",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the item is active.",
            "nullable": true
          },
          "templateItemId": {
            "type": "integer",
            "description": "Id of the template item this item was created from, or null for manual items.",
            "format": "int32",
            "nullable": true
          },
          "isManualAdded": {
            "type": "boolean",
            "description": "Whether the item was added manually (not from the template).",
            "nullable": true
          },
          "groupId": {
            "type": "integer",
            "description": "Id of the assessment group the item belongs to.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An assessment item of a report with its values. Custom column values carry BOTH column ids —\nthe template id (write key space) and the report id (column list key space).\n            \nEvery value member is nullable because the item list (listReportAssessmentItems) projects this\nresource through the fields/view selection: a non-nullable member would serialize its default\n(sortOrder 0, groupId 0, isActive false) for a field the caller did not ask for instead of\ndisappearing from the JSON, i.e. it would report data that is not in the report."
      },
      "ReportAssessmentItemResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportAssessmentItemResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "ReportAssessmentItemResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportAssessmentItemResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "ReportGradeRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the report's own copy of the grade row.",
            "format": "int32"
          },
          "templateGradeId": {
            "type": "integer",
            "description": "Id of the template grade this copy came from. This is the value patchReport accepts on /overallStatusTemplateGradeId and the id listReportAssessmentGrades returns.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name of the grade.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Colour of the grade.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the grade.",
            "nullable": true
          },
          "legend": {
            "type": "string",
            "description": "Legend text of the grade.",
            "nullable": true
          },
          "isHealth": {
            "type": "boolean",
            "description": "Whether the grade counts as healthy."
          },
          "includeInHealth": {
            "type": "boolean",
            "description": "Whether the grade takes part in the health calculation."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether the grade is the template's default."
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the grade within its set.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "The overall status grade of a report. Its `templateGradeId` — NOT `id` — is the value\npatchReport accepts on /overallStatusTemplateGradeId, and it is the id listReportAssessmentGrades\nreturns; `id` is the report's own copy of the grade row."
      },
      "ReportInitiativeItemCreateResource": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Display name of the item. Max 255 characters."
          },
          "summary": {
            "type": "string",
            "description": "Short summary of the item. Max 1000 characters.",
            "nullable": true
          },
          "nextSteps": {
            "type": "string",
            "description": "Next steps recorded on the item. Max 8000 characters.",
            "nullable": true
          },
          "siteId": {
            "type": "integer",
            "description": "Site to place the item at. Must be an ACTIVE site of the item's company. Sites have no listing operation — read the id off an item's site object.",
            "format": "int32",
            "nullable": true
          },
          "assigneeId": {
            "type": "string",
            "description": "User to assign the item to (string GUID, see listUsers). Must have access to the item's company.",
            "nullable": true
          },
          "statusId": {
            "type": "string",
            "description": "Status option id, from the Status column's options in the COLUMN LIST OF THE SCOPE you are creating in — listInitiativeColumns in module scope, listReportInitiativeColumns in report scope. Omit to take the option marked isDefault.",
            "nullable": true
          },
          "priorityId": {
            "type": "string",
            "description": "Priority option id, from the Priority column's options in the column list of the SCOPE you are creating in (listInitiativeColumns or listReportInitiativeColumns). Omit to take the option marked isDefault.",
            "nullable": true
          },
          "budgetEstimate": {
            "type": "string",
            "description": "Free-text budget range, for example \"$5k-$10k\". Max 50 characters.",
            "nullable": true
          },
          "itemsBudget": {
            "type": "number",
            "description": "Related Items line of the one-time budget (the related Technology Items). The item's oneTimeBudget is the sum of the three lines and cannot be set directly.",
            "format": "double",
            "nullable": true
          },
          "laborBudget": {
            "type": "number",
            "description": "Labor line of the one-time budget.",
            "format": "double",
            "nullable": true
          },
          "partsBudget": {
            "type": "number",
            "description": "Parts line of the one-time budget.",
            "format": "double",
            "nullable": true
          },
          "recurringBudget": {
            "type": "number",
            "description": "Recurring budget of the item.",
            "format": "double",
            "nullable": true
          },
          "recurringPeriod": {
            "type": "integer",
            "description": "Number of periods the recurring budget covers.",
            "format": "int32",
            "nullable": true
          },
          "recurringTotal": {
            "type": "number",
            "description": "Total of the recurring budget over its periods.",
            "format": "double",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity recorded on the item.",
            "format": "int32",
            "nullable": true
          },
          "month": {
            "type": "integer",
            "description": "Budget month of the item (1-12).",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Budget year of the item.",
            "format": "int32",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Effective date of the item (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "cancellationDate": {
            "type": "string",
            "description": "Cancellation date of the item (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "tagsIds": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Tags to assign to the item, from the tag list of the SCOPE you are creating in (listInitiativeTags or listReportInitiativeTags). Max 50.",
            "nullable": true
          },
          "columnValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitiativeItemColumnValuesInput"
            },
            "description": "Values to store in the item's custom columns, one entry per column. Typed system fields have their own members above and never appear here.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of createReportInitiativeItem: the module create body minus the company. A report renders exactly\none company and the report's draft scope assigns it\n(`InitiativeReportPartDraftScopeService.CreateItem` refuses an explicit different one and fills in\nan omitted one), so publishing the field would offer a caller a value that is either ignored or\nrefused. It is absent instead — the honest contract for a scope that cannot express the refused case.\nEverything else is External.API.Models.Initiatives.InitiativeItemCreateResourceBase, shared with\nExternal.API.Models.Initiatives.InitiativeItemCreateResource so the two families cannot drift."
      },
      "ReportInput": {
        "required": [
          "companyId",
          "templateId"
        ],
        "type": "object",
        "properties": {
          "companyId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Id of the company to create the report for (see listCompanies).",
            "format": "int32"
          },
          "templateId": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "Id of the assessment template to build the report from (the id of a report's template object).",
            "format": "int32"
          },
          "carryDataFromPreviousReport": {
            "type": "boolean",
            "description": "When true (the default) the new report copies the company's latest report of the same template forward — content and filters, exactly as the application's New button does. When false the report is built blank from the template.",
            "default": true
          }
        },
        "additionalProperties": false,
        "description": "Body of createReport. A report is always created for one company from one assessment template.\nBy default the new report copies the company's latest report of the same template forward\n(content and filters), exactly as the application's New button does; set\ncarryDataFromPreviousReport to false to build it blank from the template. Creating a report\nCLOSES the company's existing draft report for the same template — that is the application's own\nbehaviour and it is not optional."
      },
      "ReportPartResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the report part.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Display name of the part.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "executiveSummary",
              "assessmentLegend",
              "assessment",
              "overview",
              "assetsLegend",
              "assets",
              "roadmap",
              "budget",
              "legend",
              "externalContent",
              "text",
              "embedHtml",
              "cover",
              "contacts",
              "office365",
              "tickets",
              "flexibleItems",
              "plan",
              "flexibleRoadmap",
              "flexibleBudget",
              "fiLegend",
              "initiatives",
              "agreements",
              "goals",
              "opportunities",
              "newDashboard",
              "projects"
            ],
            "type": "string",
            "description": "Type of the part (assessment, text, cover, plan, flexibleItems, ...). It decides which nested sub-resources the part has."
          },
          "color": {
            "type": "string",
            "description": "Colour of the part.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the part.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the part within the report.",
            "format": "double"
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the part is active."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether the part is one of the template's default parts."
          },
          "isInternal": {
            "type": "boolean",
            "description": "Whether the part is internal-only (hidden from External Client users in the application)."
          },
          "isShowOnBuildMode": {
            "type": "boolean",
            "description": "Whether the part is shown in build mode."
          },
          "isShowOnDisplayMode": {
            "type": "boolean",
            "description": "Whether the part is shown in display mode."
          },
          "isShowOnPresentationMode": {
            "type": "boolean",
            "description": "Whether the part is shown in presentation mode."
          },
          "templatePartId": {
            "type": "integer",
            "description": "Id of the template part this part was created from, or null.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One part (section) of a report."
      },
      "ReportPartResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportPartResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "ReportPlanResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the plan attached to the report part. Always present.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the plan, or null when the plan can no longer be resolved (deleted, or an archived report whose snapshot predates the feature). The id is still returned in that case.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The plan attached to a report part, as the report context sees it: the plan id plus its name.\nA DANGLING reference — the plan row was deleted, or the report's archive blob predates the\nfeature — keeps the id and returns a null name, so \"the plan is gone\" stays distinguishable from\n\"this part carries no plan\", which is reported as notFound instead. There is no isDeleted flag."
      },
      "ReportPlanResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportPlanResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "ReportPlanTemplateInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Display name of the template. Required, unique within your client, at most 50 characters."
          },
          "icon": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Icon of the template. At most 50 characters. Omitted leaves the server default.",
            "nullable": true
          },
          "color": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string",
            "description": "Colour of the template. At most 50 characters. Omitted leaves the server default.",
            "nullable": true
          },
          "includeItemDescriptions": {
            "type": "boolean",
            "description": "Carry the source plan's item descriptions into the template items. Applies to both create paths that have a source plan: createPlanTemplate (the planId in this body) and convertReportPlanToTemplate (the report part's own plan; this body carries no planId). Defaults to false."
          },
          "includeCustomColumns": {
            "type": "boolean",
            "description": "Carry the source plan's custom columns (and their values) into the template. Applies to both create paths that have a source plan: createPlanTemplate (the planId in this body) and convertReportPlanToTemplate (the report part's own plan; this body carries no planId). Defaults to false."
          }
        },
        "additionalProperties": false,
        "description": "Create body for convertReportPlanToTemplate: the plan-template create fields WITHOUT planId. The\nsource plan is not a body field here — it is the plan of the report part named in the route, and on a\ncompleted or archived report it is that plan as the report's archive holds it, which no planId can\naddress. Everything else is the createPlanTemplate body: name, icon, colour and the two carry flags,\ninherited from PlanTemplateInputBase so the two bodies cannot drift."
      },
      "ReportRelatedRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the related entity.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Display name of the related entity.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A related entity reference on the report assessment surface: id + name."
      },
      "ReportResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the report. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the report.",
            "nullable": true
          },
          "statusEnum": {
            "enum": [
              "archive",
              "completed",
              "draft"
            ],
            "type": "string",
            "description": "Lifecycle status of the report: draft, completed or archive.",
            "nullable": true
          },
          "reportDate": {
            "type": "string",
            "description": "Date the report is dated with (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "healthScore": {
            "type": "integer",
            "description": "Health score of the report, or null when it has none. Recomputed live for a draft report.",
            "format": "int32",
            "nullable": true
          },
          "fiscalYearStartMonthEnum": {
            "enum": [
              "january",
              "february",
              "march",
              "april",
              "may",
              "june",
              "july",
              "august",
              "september",
              "october",
              "november",
              "december"
            ],
            "type": "string",
            "description": "First month of the fiscal year used by the report, falling back to the company and then the account default. Only present in the Full view.",
            "nullable": true
          },
          "company": {
            "$ref": "#/components/schemas/ReportRelatedRef"
          },
          "template": {
            "$ref": "#/components/schemas/ReportRelatedRef"
          },
          "preparedByUser": {
            "$ref": "#/components/schemas/ReportUserRef"
          },
          "overallStatusGrade": {
            "$ref": "#/components/schemas/ReportGradeRef"
          }
        },
        "additionalProperties": false,
        "description": "A report visible to the caller. Fields are omitted from the JSON when not selected via the\nfields/view parameters (id is always present). The internal application's presentation flags\n(isAssetsEnabled, isContactsEnabled, isOffice365Enabled, isNewVersionAllowed) are deliberately\nnot part of this contract — they describe the UI, not the report."
      },
      "ReportResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "ReportResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "ReportSummaryAndNoteResource": {
        "type": "object",
        "properties": {
          "partId": {
            "type": "integer",
            "description": "Id of the report part the content belongs to.",
            "format": "int32"
          },
          "partName": {
            "type": "string",
            "description": "Display name of the report part.",
            "nullable": true
          },
          "partTypeEnum": {
            "enum": [
              "undefined",
              "executiveSummary",
              "assessmentLegend",
              "assessment",
              "overview",
              "assetsLegend",
              "assets",
              "roadmap",
              "budget",
              "legend",
              "externalContent",
              "text",
              "embedHtml",
              "cover",
              "contacts",
              "office365",
              "tickets",
              "flexibleItems",
              "plan",
              "flexibleRoadmap",
              "flexibleBudget",
              "fiLegend",
              "initiatives",
              "agreements",
              "goals",
              "opportunities",
              "newDashboard",
              "projects"
            ],
            "type": "string",
            "description": "Type of the report part. Only executiveSummary, text and cover parts carry this content."
          },
          "executiveSummary": {
            "type": "string",
            "description": "Executive summary HTML of the part, or null when it has none.",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Note HTML of the part, or null when it has none.",
            "nullable": true
          },
          "isNoteIncluded": {
            "type": "boolean",
            "description": "Whether the note is shown on the part — the text part's includeNote flag. Change it with patchReportPartTextPart, not here."
          }
        },
        "additionalProperties": false,
        "description": "The executive summary and the note of one report part — TWO independent HTML strings, plus the\nflag that decides whether the note is shown. The flag is READ-ONLY here: it is written through\nthe text part (patchReportPartTextPart /includeNote), because it belongs to the part's shell,\nnot to the content. Same shape as getGroupTemplateSummaryAndNote on the template side."
      },
      "ReportSummaryAndNoteResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportSummaryAndNoteResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "ReportSummaryAndNoteResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportSummaryAndNoteResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "ReportTextPartResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the report part.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Display name of the part. Read-only through this endpoint.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "executiveSummary",
              "assessmentLegend",
              "assessment",
              "overview",
              "assetsLegend",
              "assets",
              "roadmap",
              "budget",
              "legend",
              "externalContent",
              "text",
              "embedHtml",
              "cover",
              "contacts",
              "office365",
              "tickets",
              "flexibleItems",
              "plan",
              "flexibleRoadmap",
              "flexibleBudget",
              "fiLegend",
              "initiatives",
              "agreements",
              "goals",
              "opportunities",
              "newDashboard",
              "projects"
            ],
            "type": "string",
            "description": "Type of the part. Always text for this endpoint."
          },
          "color": {
            "type": "string",
            "description": "Colour of the part. Read-only through this endpoint.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the part. Read-only through this endpoint.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the part within the report. Read-only through this endpoint.",
            "format": "double"
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the part is active. Read-only through this endpoint."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether the part is one of the template's default parts."
          },
          "isInternal": {
            "type": "boolean",
            "description": "Whether the part is internal-only (hidden from External Client users in the application)."
          },
          "isShowOnBuildMode": {
            "type": "boolean",
            "description": "Whether the part is shown in build mode."
          },
          "isShowOnDisplayMode": {
            "type": "boolean",
            "description": "Whether the part is shown in display mode."
          },
          "isShowOnPresentationMode": {
            "type": "boolean",
            "description": "Whether the part is shown in presentation mode."
          },
          "templatePartId": {
            "type": "integer",
            "description": "Id of the template part this part was created from, or null.",
            "format": "int32",
            "nullable": true
          },
          "includeNote": {
            "type": "boolean",
            "description": "Whether the part's note is shown alongside its executive summary. The only writable field of this resource (patchReportPartTextPart /includeNote)."
          }
        },
        "additionalProperties": false,
        "description": "A TEXT report part: its metadata plus the include-note flag. This is not the summary or note\ncontent — that is getReportPartSummaryAndNote. Only the include-note flag is writable here."
      },
      "ReportTextPartResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReportTextPartResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "ReportUserRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the user (a string GUID; see getUser).",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "description": "First name of the user.",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the user.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A user referenced by a report. The id is a string GUID (pass it to getUser or to the users list\nid/ids filters); the name parts are the account's, falling back to the report's denormalized\nname when the account is gone."
      },
      "ScheduleByUserLineResource": {
        "type": "object",
        "properties": {
          "primaryUser": {
            "type": "string",
            "description": "The primary user's full name; \"(no primary user)\" on the line of the client schedules with no primary user set (pass it as primaryUser to list them).",
            "nullable": true
          },
          "companies": {
            "type": "integer",
            "description": "The distinct clients this primary user holds a counted client schedule of.",
            "format": "int32"
          },
          "schedules": {
            "type": "integer",
            "description": "Their client schedules (a client and a template): overdue + dueThisMonth + onTrack + done = schedules, never fewer than companies.",
            "format": "int32"
          },
          "overdue": {
            "type": "integer",
            "description": "Their client schedules that are overdue.",
            "format": "int32"
          },
          "dueThisMonth": {
            "type": "integer",
            "description": "Their client schedules due this month.",
            "format": "int32"
          },
          "onTrack": {
            "type": "integer",
            "description": "Their client schedules on track.",
            "format": "int32"
          },
          "done": {
            "type": "integer",
            "description": "Their client schedules done.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "One primary user's (vCIO's) share of the client schedules counted."
      },
      "ScheduleCompanyLineResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "template": {
            "type": "string",
            "description": "Report template name.",
            "nullable": true
          },
          "primaryUser": {
            "type": "string",
            "description": "The primary user's (vCIO's) full name; omitted when none is set.",
            "nullable": true
          },
          "reportsPerYear": {
            "type": "integer",
            "description": "The schedule's reports per year; 1 when the client has no schedule for the template and year (it is listed because it has a report of the template this year or last year).",
            "format": "int32"
          },
          "targetMonths": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "The target months (1-12): the ones set on the schedule, else the default cadence (12 = every month, 4 = 1, 4, 7, 10, 2 = 1, 7, 1 = 1); with no schedule for the year, the month of the latest report of the template; empty with 0 reports per year.",
            "nullable": true
          },
          "completedMonths": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "The distinct months with a Completed or Archive report of this template and client in the year.",
            "nullable": true
          },
          "draftMonths": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "The distinct months with a Draft report; drafts never count as delivered.",
            "nullable": true
          },
          "status": {
            "enum": [
              "overdue",
              "dueThisMonth",
              "onTrack",
              "done"
            ],
            "type": "string",
            "description": "overdue, dueThisMonth, onTrack or done."
          },
          "overdueCount": {
            "type": "integer",
            "description": "Target months passed (before the current month) minus months delivered so far (the current month included), never below 0.",
            "format": "int32"
          },
          "nextDueMonth": {
            "type": "integer",
            "description": "The first target month from the current month on with no delivered report; omitted when done or none is left.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One client schedule: a client and a report template in the year, with its target months, the months its reports\nwere delivered in and where it stands by query_schedule's rule (not the Schedule screen's)."
      },
      "SchedulePrimaryUserInput": {
        "required": [
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "minLength": 1,
            "type": "string",
            "description": "Id of the user to make the company's primary user for the template and year, as a string GUID (see listUsers). Required. A user of another tenant is reported as not found; a user who cannot see the company is refused. The primary user cannot be cleared through the API."
          },
          "year": {
            "type": "integer",
            "description": "The schedule year to set. Optional; defaults to the current year. Accepted range 2000 to 2100. An entry that does not exist yet for that year is created with one report per year.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The body updateCompanySchedulePrimaryUser takes."
      },
      "TechnologyColumnResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the column. Always returned.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display label of the column.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "customAppField",
              "customIntegrationField",
              "grade",
              "month",
              "year",
              "oneTimeBudget",
              "recurringBudget",
              "recurringPeriod",
              "quantity",
              "recurringTotal",
              "effectiveDate",
              "cancellationDate",
              "company",
              "site",
              "status",
              "serialNumber",
              "name",
              "manufacturer",
              "purchaseDate",
              "expirationDate",
              "note",
              "productId",
              "soNotes",
              "lastLoginName",
              "configurationType",
              "model",
              "technologyTypeBudgetClass",
              "endOfLife",
              "initiativeItem"
            ],
            "type": "string",
            "description": "What the column holds: an intrinsic item field (grade, month, oneTimeBudget, …), a custom app field, or an integration-synced field.",
            "nullable": true
          },
          "isEditable": {
            "type": "boolean",
            "description": "Whether patchTechnologyItem / patchTechnologyItems may write this column's data for an item. This is about item VALUES — it says nothing about patchTechnologyColumn, which edits the column itself.",
            "nullable": true
          },
          "patchPath": {
            "type": "string",
            "description": "The item-patch JSON Patch path that writes this column, for example /gradeId, /class or /columns/17. Absent when isEditable is false. Integration-synced columns and computed columns are never writable.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-text description of the column.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the column within the group. The default list order.",
            "format": "double",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the column is active.",
            "nullable": true
          },
          "isRecurring": {
            "type": "boolean",
            "description": "Whether the column holds a recurring value.",
            "nullable": true
          },
          "customColumnTypeEnum": {
            "enum": [
              "undefined",
              "singleSelectDropDown",
              "text",
              "date",
              "user",
              "checkbox",
              "link",
              "image",
              "number",
              "html",
              "age",
              "smartMemory",
              "smartOS",
              "class"
            ],
            "type": "string",
            "description": "The custom type of a custom app or integration field (text, checkbox, date, link, singleSelectDropDown, class, …), or null for an intrinsic column.",
            "nullable": true
          },
          "typeSettings": {
            "description": "The column's type configuration — for a singleSelectDropDown or class column this carries the allowed values. Read it before patching such a column. Read-only.",
            "nullable": true
          },
          "sourceColumnId": {
            "type": "integer",
            "description": "Id of the column this one derives its values from (reference columns), or null.",
            "format": "int32",
            "nullable": true
          },
          "integration": {
            "$ref": "#/components/schemas/TechnologyRelatedRef"
          },
          "viewSettings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyViewSettingRef"
            },
            "description": "Per-view display settings (common / build / display / presentation), including the configured width. Read-only.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A column of a technology (flexible items) group. Internal columns are never returned here, in any\nrole. Fields are omitted from the JSON when not selected via the fields/view parameters (only\nrequested fields are returned; id is always present)."
      },
      "TechnologyColumnResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyColumnResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "TechnologyColumnResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TechnologyColumnResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "TechnologyCountLineResource": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The group label, category, site (\"HQ (Contoso)\" across clients), client name or OS; \"(none)\" counts the items with no site or no OS.",
            "nullable": true
          },
          "source": {
            "type": "string",
            "description": "The integration the line's items come from (several joined); omitted for a manual group and on site, client and OS lines.",
            "nullable": true
          },
          "count": {
            "type": "integer",
            "description": "Matching items in the line.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "One group of the matched technology items: a technology group, a category, a site, a client or an operating system."
      },
      "TechnologyGradeInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Display name of the grade. Required and must be unique within the client."
          },
          "color": {
            "type": "string",
            "description": "Grade colour (hex string, e.g. #2ECC71).",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this grade is the client's default. Setting true clears the previous default; a client always keeps exactly one default (you cannot clear the last default)."
          },
          "isHealth": {
            "type": "boolean",
            "description": "Whether this grade is a health grade."
          },
          "includeInHealth": {
            "type": "boolean",
            "description": "Whether this grade is included in the health calculation. Forced true when isHealth is true."
          },
          "isDisplayMode": {
            "type": "boolean",
            "description": "Whether this grade is shown in display mode."
          },
          "isPresentationMode": {
            "type": "boolean",
            "description": "Whether this grade is shown in presentation mode."
          },
          "icon": {
            "type": "string",
            "description": "Grade icon identifier.",
            "nullable": true
          },
          "legend": {
            "type": "string",
            "description": "Grade legend text.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Create body for a technology grade (createTechnologyGrade). It deliberately carries no\n`sortOrder`: the core assigns a new grade the last position itself, so accepting one here\nwould be a value silently thrown away. External.API.Models.Technology.Grades.TechnologyGradeUpdateInput adds it for PUT,\nmirroring the internal AssetsGradeInputModel / AssetsGradeUpdateModel split. Both bind to the same\nshared AssetsGrade core write path — there is no second persistence path."
      },
      "TechnologyGradeResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the grade. Always returned. Use it as the item patch /gradeId value.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the grade. Unique within the client.",
            "nullable": true
          },
          "systemType": {
            "enum": [
              "gradeNeeded",
              "healthy",
              "warning",
              "danger"
            ],
            "type": "string",
            "description": "Set on the four grades auto-grading writes - GradeNeeded, Healthy, Warning or Danger - and null on a grade you created. Read-only: these four are bound by this key, so you may rename and restyle them but never delete them, and their isDefault / isHealth / includeInHealth cannot be changed.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Grade colour (hex string, e.g. #2ECC71).",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the client's default grade. Exactly one grade is the default; setting a new default clears the old one.",
            "nullable": true
          },
          "isHealth": {
            "type": "boolean",
            "description": "Whether this grade counts as a health grade (drives item health, which is computed on read).",
            "nullable": true
          },
          "includeInHealth": {
            "type": "boolean",
            "description": "Whether this grade is included in the health calculation. Always true when isHealth is true.",
            "nullable": true
          },
          "isDisplayMode": {
            "type": "boolean",
            "description": "Whether this grade is shown in display mode.",
            "nullable": true
          },
          "isPresentationMode": {
            "type": "boolean",
            "description": "Whether this grade is shown in presentation mode.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Grade icon identifier.",
            "nullable": true
          },
          "legend": {
            "type": "string",
            "description": "Grade legend text.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the grade within the client's grade list.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A technology (flexible items) grade for the caller's client: the health/rating labels an item can\nbe assigned. Fields are omitted from the JSON when not selected via the fields/view parameters\n(only requested fields are returned; id is always present)."
      },
      "TechnologyGradeResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyGradeResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "TechnologyGradeResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TechnologyGradeResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "TechnologyGradeUpdateInput": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Display name of the grade. Required and must be unique within the client."
          },
          "color": {
            "type": "string",
            "description": "Grade colour (hex string, e.g. #2ECC71).",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this grade is the client's default. Setting true clears the previous default; a client always keeps exactly one default (you cannot clear the last default)."
          },
          "isHealth": {
            "type": "boolean",
            "description": "Whether this grade is a health grade."
          },
          "includeInHealth": {
            "type": "boolean",
            "description": "Whether this grade is included in the health calculation. Forced true when isHealth is true."
          },
          "isDisplayMode": {
            "type": "boolean",
            "description": "Whether this grade is shown in display mode."
          },
          "isPresentationMode": {
            "type": "boolean",
            "description": "Whether this grade is shown in presentation mode."
          },
          "icon": {
            "type": "string",
            "description": "Grade icon identifier.",
            "nullable": true
          },
          "legend": {
            "type": "string",
            "description": "Grade legend text.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the grade within the client's grade list.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "Full-replace body for updateTechnologyGrade (PUT). It is the create body plus `sortOrder`:\nthe position is assigned by the server on create (last) and only becomes writable afterwards —\nthe same split the internal AssetsGrade write models make."
      },
      "TechnologyGroupResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the group. Always returned. Use it in the columns and items routes.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display label of the group.",
            "nullable": true
          },
          "typeEnum": {
            "enum": [
              "undefined",
              "flexibleAsset",
              "dataConfiguration",
              "manual",
              "domain",
              "ssl",
              "psa"
            ],
            "type": "string",
            "description": "What kind of group this is (flexibleAsset, dataConfiguration, psa, domain, ssl, …). Read-only.",
            "nullable": true
          },
          "sortOrder": {
            "type": "number",
            "description": "Sort order of the group within its section. The default list order.",
            "format": "double",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Group icon identifier.",
            "nullable": true
          },
          "columnCount": {
            "type": "integer",
            "description": "How many columns the group has, internal ones included. listTechnologyColumns returns only the ones visible to you, so it can return fewer.",
            "format": "int32",
            "nullable": true
          },
          "section": {
            "$ref": "#/components/schemas/TechnologyRelatedRef"
          },
          "integration": {
            "$ref": "#/components/schemas/TechnologyRelatedRef"
          },
          "viewSettings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyViewSettingRef"
            },
            "description": "Per-view display settings (common / build / display / presentation). Read-only.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A technology (flexible items) group of the caller's client — the container that owns the columns and\nitems reached through the sibling routes. Fields are omitted from the JSON when not selected via the\nfields/view parameters (only requested fields are returned; id is always present). Groups are\nread-only in v1: there is no external create, patch or delete."
      },
      "TechnologyGroupResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyGroupResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "TechnologyGroupResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TechnologyGroupResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "TechnologyItemColumnValues": {
        "type": "object",
        "properties": {
          "columnId": {
            "type": "integer",
            "description": "Id of the column these values belong to (see listTechnologyColumns).",
            "format": "int32",
            "nullable": true
          },
          "values": {
            "type": "array",
            "items": { },
            "description": "The values held in that column. Most columns hold a single value.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The values an item holds in one of its group's columns. Values of internal columns are never returned.\nMatch columnId against listTechnologyColumns to learn the column's type and whether it is writable."
      },
      "TechnologyItemGradeRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the grade. Use it as the item patch /gradeId value.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the grade.",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Grade colour (hex string). Returned in view=Full only.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Grade icon identifier. Returned in view=Full only.",
            "nullable": true
          },
          "legend": {
            "type": "string",
            "description": "Grade legend text. Returned in view=Full only.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The grade assigned to a technology item. Richer than the plain id + name related shape because a grade\ncarries display meaning an agent needs (colour, icon, legend) — its extras are returned only in\nview=Full. The id round-trips into patchTechnologyItem's /gradeId and into getTechnologyGrade."
      },
      "TechnologyItemResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the item. Always returned. Also the default sort key.",
            "format": "int32",
            "nullable": true
          },
          "company": {
            "$ref": "#/components/schemas/TechnologyRelatedRef"
          },
          "grade": {
            "$ref": "#/components/schemas/TechnologyItemGradeRef"
          },
          "manualGradeId": {
            "type": "integer",
            "description": "Id of the grade a person set on this item, or null when the item is on Auto. This is what patchTechnologyItem /gradeId writes; a null clears the override and hands the item back to auto-grading.",
            "format": "int32",
            "nullable": true
          },
          "autoGradeId": {
            "type": "integer",
            "description": "Id of the grade auto-grading computed for this item, or null when the item's type does not auto-grade. Read-only: it is always one of the four system grades (see listTechnologyGrades systemType).",
            "format": "int32",
            "nullable": true
          },
          "endOfLife": {
            "type": "string",
            "description": "The item's effective End of Life date: the date a person typed if there is one, otherwise the date auto-grading computed. This is the date the grade is derived from.",
            "format": "date-time",
            "nullable": true
          },
          "endOfLifeGrade": {
            "enum": [
              "gradeNeeded",
              "healthy",
              "warning",
              "danger"
            ],
            "type": "string",
            "description": "How urgent endOfLife is by the date alone: \"Danger\" once the date has passed, \"Warning\" inside the technology type's warning window (its auto-grading warningMonths), \"Healthy\" beyond it. Warranty is not considered here - it is already part of grade. Read-only; null when there is no endOfLife date or the item's group has no technology type.",
            "nullable": true
          },
          "manualEndOfLife": {
            "type": "string",
            "description": "End of Life date a person typed on this item, or null when the item follows the computed one. This is what patchTechnologyItem /endOfLife writes; a null clears the override.",
            "format": "date-time",
            "nullable": true
          },
          "autoEndOfLife": {
            "type": "string",
            "description": "End of Life date auto-grading computed: the earlier of the item's replacement date and the end of support of its operating system. Read-only, and null when neither is known.",
            "format": "date-time",
            "nullable": true
          },
          "autoEndOfLifeByLifespan": {
            "type": "string",
            "description": "The replacement-date half of autoEndOfLife: the item's purchase date plus its effective lifespan - the lifespan of its budget class, or of the technology type's default class when the item has none. Read-only, and null when no lifespan resolves or there is no usable purchase date.",
            "format": "date-time",
            "nullable": true
          },
          "autoEndOfLifeLifespanYears": {
            "type": "integer",
            "description": "The lifespan in years behind autoEndOfLifeByLifespan: the item's budget class, or the technology type's default class when the item has none, with the company's override applied. Set whenever a lifespan resolves, even when autoEndOfLifeByLifespan is null for lack of a purchase date. Null when neither class has a lifespan. Read-only.",
            "format": "int32",
            "nullable": true
          },
          "autoEndOfLifeByOperatingSystem": {
            "type": "string",
            "description": "The operating-system half of autoEndOfLife: the end of support of the OS named in autoEndOfLifeOperatingSystemName. Read-only, and null when no operating system was matched or its date is not set yet.",
            "format": "date-time",
            "nullable": true
          },
          "autoEndOfLifeOperatingSystemName": {
            "type": "string",
            "description": "The operating system the End of Life lookup matched, e.g. \"Windows 10 Pro\". Set even when autoEndOfLifeByOperatingSystem is null, which means the operating system is recognised but has no end-of-support date on record. Null means nothing matched. Read-only.",
            "nullable": true
          },
          "month": {
            "type": "integer",
            "description": "Month component of the item's period (1-12) - the EFFECTIVE one: the month a person set if there is one, otherwise the month the item's budget class computed (auto budget). Write it with patchTechnologyItem /month.",
            "format": "int32",
            "nullable": true
          },
          "manualMonth": {
            "type": "integer",
            "description": "Month set on this item (1-12): by a person, by the Initiative the item is linked to, or kept from the auto budget when the item lost its budget class; null when the item follows the auto-budget month. This is what patchTechnologyItem /month writes; a null clears the override.",
            "format": "int32",
            "nullable": true
          },
          "autoMonth": {
            "type": "integer",
            "description": "Month the auto budget computed for this item: its purchase date plus the lifespan of its budget class. Read-only, and null when the item has no budget class, no schedule was computed, or the item is linked to an Initiative.",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Year component of the item's period - the EFFECTIVE one: the year a person set if there is one, otherwise the year the item's budget class computed (auto budget). Write it with patchTechnologyItem /year.",
            "format": "int32",
            "nullable": true
          },
          "manualYear": {
            "type": "integer",
            "description": "Year set on this item: by a person, by the Initiative the item is linked to, or kept from the auto budget when the item lost its budget class; null when the item follows the auto-budget year. This is what patchTechnologyItem /year writes; a null clears the override.",
            "format": "int32",
            "nullable": true
          },
          "autoYear": {
            "type": "integer",
            "description": "Year the auto budget computed for this item: its purchase date plus the lifespan of its budget class. Read-only, and null when the item has no budget class, no schedule was computed, or the item is linked to an Initiative.",
            "format": "int32",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "number",
            "description": "One-time budget for the item.",
            "format": "double",
            "nullable": true
          },
          "recurringBudget": {
            "type": "number",
            "description": "Recurring budget for the item.",
            "format": "double",
            "nullable": true
          },
          "recurringPeriod": {
            "type": "integer",
            "description": "How many months the recurring budget covers.",
            "format": "int32",
            "nullable": true
          },
          "recurringTotal": {
            "type": "number",
            "description": "Total recurring value, computed by the server. Read-only.",
            "format": "double",
            "nullable": true
          },
          "effectiveDate": {
            "type": "string",
            "description": "Date the item takes effect (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "cancellationDate": {
            "type": "string",
            "description": "Date the item is cancelled (UTC).",
            "format": "date-time",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity for the item.",
            "format": "int32",
            "nullable": true
          },
          "site": {
            "$ref": "#/components/schemas/TechnologyRelatedRef"
          },
          "status": {
            "$ref": "#/components/schemas/TechnologyRelatedRef"
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyItemColumnValues"
            },
            "description": "Values held in the group's columns. Internal columns are never included.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One item (row) of a technology group. Fields are omitted from the JSON when not selected via the\nfields/view parameters (only requested fields are returned; id is always present). Which of these are\nwritable, and through which JSON Patch path, is published per column by listTechnologyColumns —\nrecurringTotal is computed and never writable."
      },
      "TechnologyItemResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyItemResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "TechnologyItemResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TechnologyItemResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "TechnologyItemRowResource": {
        "type": "object",
        "properties": {
          "client": {
            "type": "string",
            "description": "Client (company) name.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Item name (the Name column).",
            "nullable": true
          },
          "category": {
            "type": "string",
            "description": "The item's technology group label.",
            "nullable": true
          },
          "site": {
            "type": "string",
            "description": "Site name; omitted when the item has none.",
            "nullable": true
          },
          "os": {
            "type": "string",
            "description": "Operating system as the OS column shows it.",
            "nullable": true
          },
          "ageYears": {
            "type": "integer",
            "description": "Whole years of age (the Age column, else from the purchase date).",
            "format": "int32",
            "nullable": true
          },
          "purchaseDate": {
            "type": "string",
            "description": "Purchase date, yyyy-MM-dd.",
            "nullable": true
          },
          "warrantyExpires": {
            "type": "string",
            "description": "Warranty expiration date, yyyy-MM-dd, followed by \"(expired)\" when it is before today.",
            "nullable": true
          },
          "warrantyExpired": {
            "type": "boolean",
            "description": "Whether the warranty has expired; omitted when there is no expiration date.",
            "nullable": true
          },
          "grade": {
            "type": "string",
            "description": "Technology grade name.",
            "nullable": true
          },
          "make": {
            "type": "string",
            "description": "Manufacturer.",
            "nullable": true
          },
          "model": {
            "type": "string",
            "description": "Model.",
            "nullable": true
          },
          "lastUser": {
            "type": "string",
            "description": "Last logged-in user.",
            "nullable": true
          },
          "source": {
            "type": "string",
            "description": "The integration the item comes from; omitted when scope names the one source, or for a manual group.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One technology item, by names only."
      },
      "TechnologyItemsBulkPatchInput": {
        "required": [
          "entityIds"
        ],
        "type": "object",
        "properties": {
          "entityIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of the items to patch. Required and non-empty — an empty list is rejected, never read as 'all items in the group'. Capped per request."
          },
          "patch": {
            "type": "array",
            "items": {
              "required": [
                "op",
                "path"
              ],
              "type": "object",
              "properties": {
                "op": {
                  "type": "string",
                  "description": "Operation to perform: add, remove, replace, move, copy or test."
                },
                "path": {
                  "type": "string",
                  "description": "JSON Pointer to the target member, spelled exactly as THIS operation's own description documents its patchable paths — the casing differs per operation, so never carry a path from one operation to another."
                },
                "value": {
                  "description": "New value for add, replace and test. Any JSON type: string, number, boolean, array, object or null."
                },
                "from": {
                  "type": "string",
                  "description": "Source JSON Pointer. Required by move and copy, unused otherwise."
                }
              }
            },
            "description": "The RFC 6902 operation array to apply to every listed item. Same paths as patchTechnologyItem."
          }
        },
        "additionalProperties": false,
        "description": "Bulk patch request: apply ONE JSON Patch to several items of a group, targeted by an explicit id list.\nThe wrapper is application/json; External.API.Models.Technology.Items.TechnologyItemsBulkPatchInput.Patch is the raw RFC 6902 operation array, bound as a\nJsonElement because System.Text.Json cannot materialize a JsonPatchDocument — the controller service\nconverts it.\n\nThere is deliberately no filter-based targeting: an agent has no grid in front of it, and an empty\nfilter result or one matching more rows than assumed would both turn into a silent mass mutation.\nRequiring explicit ids keeps the blast radius visible in the request itself."
      },
      "TechnologyItemsBulkPatchItemError": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the item that failed.",
            "format": "int32"
          },
          "code": {
            "enum": [
              "validationFailed",
              "notFound",
              "accessDenied",
              "internalError",
              "idempotencyKeyReused",
              "requestInProgress",
              "unauthenticated",
              "notImplemented",
              "rateLimited"
            ],
            "type": "string",
            "description": "Stable, documented error codes for the external API. Values are CONTRACT once shipped\n(rename = breaking change). New values are added as real cases appear; every addition must\nland in the External API Guide's error-code catalog in the same change."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation of the failure.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One per-item failure in a bulk item patch: the item id, a machine-readable code (the shared\nExternalErrorCode, so it matches the single-resource error contract) and a human-readable message."
      },
      "TechnologyItemsBulkPatchResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyItemResource"
            },
            "description": "The items that were updated, in their Full shape.",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TechnologyItemsBulkPatchItemError"
            },
            "description": "The items that could not be updated, one entry per id.",
            "nullable": true
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Bulk item patch result envelope: the items that updated and the per-item failures — a true partial\nsuccess. An id never appears in both. The batch never fails as a whole once the request itself is\nvalid, so this arrives with 200 even when every item failed."
      },
      "TechnologyRelatedRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique identifier of the related entity.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the related entity.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A related entity on a technology resource: always id + name, so the id round-trips into the matching\nfilter. There is no external list endpoint for sections in v1 — take the id from here."
      },
      "TechnologyViewSettingRef": {
        "type": "object",
        "properties": {
          "viewTypeEnum": {
            "enum": [
              "undefined",
              "common",
              "build",
              "display",
              "presentation"
            ],
            "type": "string",
            "description": "The view this setting applies to: common, build, display or presentation.",
            "nullable": true
          },
          "isShow": {
            "type": "boolean",
            "description": "Whether the group or column is shown in this view.",
            "nullable": true
          },
          "width": {
            "type": "string",
            "description": "Configured column width in this view. Columns only; null for a group.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One per-view display setting of a technology group or column: whether the entity is shown in that\nview, and (columns only) its configured width. Read-only across the external surface — these are\nclient display configuration, not per-user state, and no external operation writes them."
      },
      "UnlinkGoalInput": {
        "required": [
          "client",
          "goal"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name, exact (case aside); a partial name or several matching clients return disambiguation candidates and unlink nothing."
          },
          "goal": {
            "minLength": 1,
            "type": "string",
            "description": "The goal's name, among that client's goals only, exact (case aside); a partial name, or several goals of that name, return disambiguation candidates and unlink nothing."
          },
          "initiatives": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of initiative items linked to the goal, exact (case aside); a name that is not linked returns the nearest linked names and unlinks nothing.",
            "nullable": true
          },
          "plans": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of plans linked to the goal whole, exact (case aside); a name that is not linked returns the nearest linked names and unlinks nothing.",
            "nullable": true
          },
          "planItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalLinkPlanItemInput"
            },
            "description": "Plan rows linked to the goal directly, each a plan name and the row's name in that plan's first part; a row covered only by its linked plan is not a direct link: unlink the plan.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of unlink_goal: which goal of which client to unlink from which initiatives, plans and plan rows, all by name.\nAt least one of initiatives, plans and planItems must hold a name; each resolves among the goal's links only."
      },
      "UnlinkInitiativeItemInput": {
        "required": [
          "client",
          "item"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name, exact (case aside); a partial name or several matching clients return disambiguation candidates and unlink nothing."
          },
          "item": {
            "minLength": 1,
            "type": "string",
            "description": "The initiative item's name, among that client's items only, exact (case aside); a partial name, or several items of that name, return disambiguation candidates and unlink nothing."
          },
          "goals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of goals linked to the item, exact (case aside); a name that is not linked returns the nearest linked names and unlinks nothing.",
            "nullable": true
          },
          "technologyItems": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of technology items linked to the item, exact (case aside); a name that is not linked returns the nearest linked names and unlinks nothing.",
            "nullable": true
          },
          "technologyGroup": {
            "type": "string",
            "description": "Technology group name, exact (case aside): technologyItems are looked up among the linked items of that group only.",
            "nullable": true
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of findings (assessment items) linked to the item, exact (case aside); a name that is not linked returns the nearest linked names and unlinks nothing.",
            "nullable": true
          },
          "template": {
            "type": "string",
            "description": "Report template name: findings are looked up among the linked findings of that template's reports only.",
            "nullable": true
          },
          "group": {
            "type": "string",
            "description": "Assessment group name: findings are looked up among the linked findings of that group only, e.g. when one name is linked from two groups.",
            "nullable": true
          },
          "report": {
            "enum": [
              "latest",
              "latestDraft",
              "latestCompleted"
            ],
            "type": "string",
            "description": "Not read by an unlink: findings resolve among the ones linked to the item; template and group narrow them."
          }
        },
        "additionalProperties": false,
        "description": "Body of unlink_initiative_item: which initiative item of which client to unlink from which goals, technology items\nand assessment findings, all by name. At least one of goals, technologyItems and findings must hold a name; each\nresolves among the item's links only."
      },
      "UnlinkProjectInput": {
        "required": [
          "client",
          "project"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name, exact (case aside); a partial name or several matching clients return disambiguation candidates and unlink nothing."
          },
          "project": {
            "minLength": 1,
            "type": "string",
            "description": "The project's name as the PSA sends it, among that client's projects only, exact (case aside); a partial name, or several projects of that name, return disambiguation candidates and unlink nothing. A project no longer synced from the PSA can still lose its links."
          },
          "initiatives": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of initiative items linked to the project, exact (case aside); a name that is not linked returns the nearest linked names and unlinks nothing.",
            "nullable": true
          },
          "planItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectLinkPlanItemInput"
            },
            "description": "Plan rows linked to the project, each a plan name and the name of a row of that plan linked to the project, in any part of the plan.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of unlink_project: which project of which client to unlink from which initiatives and plan rows, all by name. At\nleast one of initiatives and planItems must hold a name; each resolves among the project's links only."
      },
      "UpdateAssessmentItemForClientsInput": {
        "required": [
          "item"
        ],
        "type": "object",
        "properties": {
          "item": {
            "minLength": 1,
            "type": "string",
            "description": "Assessment item name on the clients' draft reports, exact (case aside), e.g. \"MDR\". A partial name or several matching items return disambiguation candidates and write nothing."
          },
          "group": {
            "type": "string",
            "description": "Assessment group name, e.g. \"Security\": picks the copy of item in that group on a draft where the item name sits more than once (without it such a client is ambiguous with the groups as candidates).",
            "nullable": true
          },
          "template": {
            "type": "string",
            "description": "Report template name, e.g. \"Quarterly Business Review\": write that template's drafts. Required with allClients. With clients, needed for a client that has open drafts of more than one template, which is otherwise ambiguous.",
            "nullable": true
          },
          "grade": {
            "type": "string",
            "description": "Grade name, e.g. \"Healthy\": one of the grades of each draft report's template; omit it, or send it empty or blank, to leave the grade unchanged.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status text to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "risk": {
            "type": "string",
            "description": "Risk text to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "solution": {
            "type": "string",
            "description": "Solution text to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "string",
            "description": "One-time budget to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "recurringBudget": {
            "type": "string",
            "description": "Recurring budget to write on the item; omit to leave it unchanged, an empty string clears it.",
            "nullable": true
          },
          "clients": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Client (company) names, exact (case aside), up to 100. Give either clients or allClients, not both. A client that is not found, has no open draft or no such item is skipped; one whose name, draft or item copy is ambiguous is listed with candidates. Neither is written.",
            "nullable": true
          },
          "allClients": {
            "type": "boolean",
            "description": "True: every client with an open draft of template (required) that you can access, in client-name order. Writes go 100 clients per call: repeat with the returned nextOffset until none is returned."
          },
          "preview": {
            "type": "boolean",
            "description": "When true (the default) nothing is written: the answer says per client what would be written, skipped or ambiguous. false writes.",
            "default": true
          },
          "offset": {
            "maximum": 2147483647,
            "minimum": 0,
            "type": "integer",
            "description": "allClients writes only: the first client of this call in client-name order; send the nextOffset of the previous answer (0 for the first call).",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Body of update_assessment_item_for_clients: one assessment item by name and one set of values (at least one), written\non the open draft of each named client or of every client with an open draft of the named template. A value left out\nis left as it is on the item."
      },
      "UpdateAssessmentItemForClientsResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next.",
            "nullable": true
          },
          "item": {
            "type": "string",
            "description": "The item name as resolved.",
            "nullable": true
          },
          "template": {
            "type": "string",
            "description": "The template name as resolved; omitted when none was named.",
            "nullable": true
          },
          "preview": {
            "type": "boolean",
            "description": "True when this answer is a preview and nothing was written; a call with preview false writes.",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "How many clients the whole request targets, on every page too: the distinct named clients, or every client with an open draft of the template. A later allClients write whose total differs from the first write's (offset 0) means the clients changed between pages: redo the writes from offset 0, a new pass with its own first total. A total that differs only from the preview's needs no repeat.",
            "format": "int32",
            "nullable": true
          },
          "noDraft": {
            "type": "integer",
            "description": "allClients: the clients you can access without an open draft of the template, counted and not listed.",
            "format": "int32",
            "nullable": true
          },
          "nextOffset": {
            "type": "integer",
            "description": "allClients writes: set while clients remain after this call; call again with offset set to it until none is returned.",
            "format": "int32",
            "nullable": true
          },
          "writtenCount": {
            "type": "integer",
            "description": "How many clients were written; in a preview, how many would be written.",
            "format": "int32",
            "nullable": true
          },
          "skippedCount": {
            "type": "integer",
            "description": "How many clients were skipped.",
            "format": "int32",
            "nullable": true
          },
          "ambiguousCount": {
            "type": "integer",
            "description": "How many clients were ambiguous.",
            "format": "int32",
            "nullable": true
          },
          "written": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiAssessmentWriteRowResource"
            },
            "description": "The clients written, in client-name order: client, the template of its draft (when the call names none), the item copy's group, and its grade and status as they read after the write. Empty in a preview.",
            "nullable": true
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiAssessmentWriteRowResource"
            },
            "description": "The clients not written, in client-name order, each with the reason: client not found, no open draft, item not on the draft, grade not on that report's template, a value refused by validation, or a write that failed (nothing was written for that client).",
            "nullable": true
          },
          "ambiguous": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiAssessmentWriteRowResource"
            },
            "description": "The clients not written because a name matched several candidates or only partly (the client, its open drafts or the item's group), in client-name order: call again with that parameter set to one candidate's exact name.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of update_assessment_item_for_clients: either disambiguation (the template or the item name did not\nresolve to one; nothing was written) or the item, the template, the totals and one row per client of this call, in\nwritten, skipped and ambiguous. In a preview nothing is written: Written is empty and WrittenCount says how many\nclients would be written."
      },
      "UpdateAssessmentItemForClientsResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UpdateAssessmentItemForClientsResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "UpdateAssessmentItemsInput": {
        "required": [
          "client",
          "items"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name, exact (case aside); a partial name or several matching clients return disambiguation candidates and write nothing."
          },
          "template": {
            "type": "string",
            "description": "Report template name, e.g. \"Quarterly Business Review\": write that template's draft. Needed when the client has an open draft of more than one template: without it the answer lists the drafts as disambiguation candidates and writes nothing. Same name rules as client.",
            "nullable": true
          },
          "items": {
            "maxItems": 200,
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssessmentItemUpdateRowInput"
            },
            "description": "The items to update, 1 to 200 rows, each with its own values. Rows are independent: a row that cannot be resolved or is refused writes nothing of itself and the other rows are still written. Two rows naming the same item are both skipped. Every row needs item: a row with item missing or blank refuses the whole call with 400, nothing written."
          }
        },
        "additionalProperties": false,
        "description": "Body of update_assessment_items: which client's current draft report to update, by name, and one row per item with\nits own values."
      },
      "UpdateAssessmentItemsResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next.",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "writtenCount": {
            "type": "integer",
            "description": "How many rows were written.",
            "format": "int32",
            "nullable": true
          },
          "skippedCount": {
            "type": "integer",
            "description": "How many rows were skipped.",
            "format": "int32",
            "nullable": true
          },
          "ambiguousCount": {
            "type": "integer",
            "description": "How many rows were ambiguous.",
            "format": "int32",
            "nullable": true
          },
          "written": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiAssessmentWriteRowResource"
            },
            "description": "The rows written, in the order sent: the item, its group, and its grade and status as they read after the write. query_assessment reads the full item.",
            "nullable": true
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiAssessmentWriteRowResource"
            },
            "description": "The rows not written, in the order sent, each with the reason: an item, group or grade not found, nothing to change, a value refused by validation, or two rows on the same item.",
            "nullable": true
          },
          "ambiguous": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiAssessmentWriteRowResource"
            },
            "description": "The rows not written because a name matched several candidates or only partly, in the order sent: set parameter on that row to one candidate's exact name and send the row again.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of update_assessment_items: either disambiguation (the client, the template or the draft did not resolve\nto one; nothing was written) or the scope, the counts and one row per item, in written, skipped and ambiguous."
      },
      "UpdateAssessmentItemsResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UpdateAssessmentItemsResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "UpdateGoalInput": {
        "required": [
          "client",
          "goal"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name, exact (case aside); a partial name or several matching clients return disambiguation candidates and write nothing."
          },
          "goal": {
            "minLength": 1,
            "type": "string",
            "description": "The goal's current name, among that client's goals only, exact (case aside); a partial name, or several goals of that name, return disambiguation candidates (status and target date as hint) and write nothing."
          },
          "newName": {
            "type": "string",
            "description": "New name of the goal, max 255 characters; omit to keep the name.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label to set: Planned, On track, At risk or Done; same name rules as client. Done does not set progress. Exactly \"\" clears the status; a label of spaces is refused. An unknown label is notFound listing every status.",
            "nullable": true
          },
          "progress": {
            "type": "integer",
            "description": "Progress to set, in percent 0-100. Stored as sent: it does not move the status.",
            "format": "int32",
            "nullable": true
          },
          "isTrackProgress": {
            "type": "boolean",
            "description": "Whether the goal's progress is tracked, true or false; false leaves progress as it is.",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "description": "Start date to set, yyyy-MM-dd (an ISO date-time is accepted; the calendar day is kept as written); the target date may not be before it.",
            "nullable": true
          },
          "targetDate": {
            "type": "string",
            "description": "Target date to set, yyyy-MM-dd (an ISO date-time is accepted; the calendar day is kept as written); it may not be before the start date.",
            "nullable": true
          },
          "owner": {
            "type": "string",
            "description": "The owner's full name, first and last, among the users who may own the goal (access to its client); same name rules as client. Exactly \"\" clears the owner; a name of spaces is refused.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Plain-text description to set, max 1000 characters; an empty string clears it.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of update_goal: which goal of which client to change, by name, and the fields to set. A member left out is left\nas it is on the goal; at least one field to set is required."
      },
      "UpdateGoalResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next. After a write: a sentence to pass on (e.g. that progress stays as it was).",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "goal": {
            "$ref": "#/components/schemas/GoalRowResource"
          }
        },
        "additionalProperties": false,
        "description": "The answer of update_goal: either disambiguation (nothing was written) or the scope and the goal as it reads after\nthe write."
      },
      "UpdateGoalResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UpdateGoalResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "UpdateInitiativeItemInput": {
        "required": [
          "client",
          "item"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and writes nothing."
          },
          "item": {
            "minLength": 1,
            "type": "string",
            "description": "The initiative item's current name, among that client's items only. An exact name wins; a term of 5 characters or fewer matches whole words only; several matches return disambiguation candidates (status and quarter as hint) and write nothing."
          },
          "newName": {
            "type": "string",
            "description": "New name of the item; omit to keep the name.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label to set, e.g. \"In Progress\"; same name rules as client. An unknown label is notFound listing every status.",
            "nullable": true
          },
          "priority": {
            "type": "string",
            "description": "Priority label to set, e.g. \"High\"; same name rules as client. An unknown label is notFound listing every priority.",
            "nullable": true
          },
          "month": {
            "type": "integer",
            "description": "Budget month to set, 1-12.",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "Budget year to set, e.g. 2027.",
            "format": "int32",
            "nullable": true
          },
          "itemsBudget": {
            "type": "number",
            "description": "Related Items line of the one-time budget to set (the related Technology Items). The item's one-time budget is the sum of the related items, labor and parts lines and is not set itself; a line left out keeps its value.",
            "format": "double",
            "nullable": true
          },
          "laborBudget": {
            "type": "number",
            "description": "Labor line of the one-time budget to set.",
            "format": "double",
            "nullable": true
          },
          "partsBudget": {
            "type": "number",
            "description": "Parts line of the one-time budget to set.",
            "format": "double",
            "nullable": true
          },
          "recurringBudget": {
            "type": "number",
            "description": "Recurring budget per period to set.",
            "format": "double",
            "nullable": true
          },
          "assignee": {
            "type": "string",
            "description": "The assignee's full name, first and last, among the active users who may be assigned the item (access to its client); same name rules as client. Exactly \"\" clears the assignee; a name of spaces is refused.",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tag names from the Initiatives tag library: the item's WHOLE new tag set, so a tag left out is removed; [] clears every tag. Each name follows the client name rules.",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "description": "Summary text to set (the item's short description), max 1000 characters; an empty string clears it.",
            "nullable": true
          },
          "nextSteps": {
            "type": "string",
            "description": "Next steps text to set, max 8000 characters; an empty string clears it.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of update_initiative_item: which initiative item of which client to change, by name, and the fields to set.\nA member left out is left as it is on the item; at least one field to set is required."
      },
      "UpdateInitiativeItemResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next.",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "item": {
            "$ref": "#/components/schemas/InitiativeRowResource"
          }
        },
        "additionalProperties": false,
        "description": "The answer of update_initiative_item: either disambiguation (nothing was written) or the scope and the item as it\nreads after the write."
      },
      "UpdateInitiativeItemResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UpdateInitiativeItemResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "UpdatePlanItemInput": {
        "required": [
          "client"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name. An exact name wins; a partial name matching several clients returns disambiguation candidates and writes nothing."
          },
          "item": {
            "type": "string",
            "description": "The item's current name (its value in the part's Name column), among that plan's items only; needed only when itemId is not given. An exact name wins; a term of 5 characters or fewer matches whole words only; several matches return disambiguation candidates (id, part and status as hint) and write nothing.",
            "nullable": true
          },
          "itemId": {
            "type": "integer",
            "description": "The item's id from a query_plans row, of a plan of the named client; when given, item, plan and part are not used to find it.",
            "format": "int32",
            "nullable": true
          },
          "plan": {
            "type": "string",
            "description": "Plan name; needed when the client has several plans you can open (without it they are returned as candidates and nothing is written). Same name rules as client.",
            "nullable": true
          },
          "part": {
            "type": "string",
            "description": "Part label; needed when the item name is in several parts of the plan (without it the parts are returned as candidates and nothing is written). Same name rules as client.",
            "nullable": true
          },
          "newName": {
            "type": "string",
            "description": "New item name, written to the part's Name column; omit to keep the name.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status label of the item's part to set, e.g. \"In Progress\" (each part has its own status list); same name rules as client. An unknown label is notFound listing the part's statuses.",
            "nullable": true
          },
          "month": {
            "type": "integer",
            "description": "The Month column to set, 1-12; any other value is refused.",
            "format": "int32",
            "nullable": true
          },
          "year": {
            "type": "integer",
            "description": "The Year column to set, a calendar year from 1900 to 2200, e.g. 2027; any other value is refused.",
            "format": "int32",
            "nullable": true
          },
          "oneTimeBudget": {
            "type": "number",
            "description": "The One-time budget column to set.",
            "format": "double",
            "nullable": true
          },
          "assignee": {
            "type": "string",
            "description": "The full name, first and last, of the user for the part's User column, among the active users with access to the plan's client; same name rules as client. An empty string clears the column.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description text of the item to set; an empty string clears it (no description).",
            "nullable": true
          },
          "parentId": {
            "type": "integer",
            "description": "Moves the item under the row with this id (a row of the same part, of a plan of the named client; it lands last there); 0 moves it to the top level of its part. The parent the item already has is no move.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body of update_plan_item: which item of which client's standalone plan to change, by name or by its id (item or\nitemId), and the fields to set. A member left out is left as it is on the item; at least one field to set is\nrequired."
      },
      "UpdatePlanItemResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next.",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "item": {
            "$ref": "#/components/schemas/PlanItemRowResource"
          },
          "description": {
            "type": "string",
            "description": "The item's description after the write.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of update_plan_item: either disambiguation (nothing was written) or the scope and the item as it reads\nafter the write."
      },
      "UpdatePlanItemResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UpdatePlanItemResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "UpdateProjectInput": {
        "required": [
          "client",
          "isInternal",
          "project"
        ],
        "type": "object",
        "properties": {
          "client": {
            "minLength": 1,
            "type": "string",
            "description": "Client (company) name, exact (case aside); a partial name or several matching clients return disambiguation candidates and write nothing."
          },
          "project": {
            "minLength": 1,
            "type": "string",
            "description": "The project's name as the PSA sends it, among that client's projects only, exact (case aside); a partial name, or several projects of that name, return disambiguation candidates (status and estimated completion as hint) and write nothing."
          },
          "isInternal": {
            "type": "boolean",
            "description": "The project's own Internal flag to set, stored as sent: true hides the project from client users (and from client views of reports); false shows a synced project (linkStatus mapped) to them again unless inheritedInternalSources is not empty (its status, type or board marked internal), which keeps it hidden (note then says so). A project that is not synced is never shown to client users."
          }
        },
        "additionalProperties": false,
        "description": "Body of update_project: which project of which client to change, by name, and the Internal flag to set."
      },
      "UpdateProjectResource": {
        "type": "object",
        "properties": {
          "disambiguation": {
            "$ref": "#/components/schemas/AiDisambiguationResource"
          },
          "note": {
            "type": "string",
            "description": "With disambiguation: the sentence saying what to do next. After a write: a sentence to pass on (e.g. that the project stays hidden from client users through its status, type or board).",
            "nullable": true
          },
          "scope": {
            "$ref": "#/components/schemas/AiScopeResource"
          },
          "project": {
            "$ref": "#/components/schemas/ProjectRowResource"
          }
        },
        "additionalProperties": false,
        "description": "The answer of update_project: either disambiguation (nothing was written) or the scope and the project as it reads\nafter the write."
      },
      "UpdateProjectResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UpdateProjectResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "UserGroupsAddInput": {
        "required": [
          "groupIds"
        ],
        "type": "object",
        "properties": {
          "groupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of the groups to add. Required and non-empty. Every id must be one listCompanyGroups returns for your tenant; an unknown id is reported as not found and NOTHING is written. A group already on the user is accepted and left exactly as it is."
          }
        },
        "additionalProperties": false,
        "description": "The body addUserGroups takes: which groups to add to the user. Required and non-empty; every id is\nchecked against the caller's tenant FIRST so one unknown id is reported as not found with nothing written."
      },
      "UserModuleRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the module.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the module type.",
            "nullable": true
          },
          "label": {
            "type": "string",
            "description": "Display label of the module.",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "description": "Icon of the module.",
            "nullable": true
          },
          "moduleTypeEnum": {
            "enum": [
              "undefined",
              "strategy",
              "stack",
              "schedule",
              "companies",
              "tickets",
              "embeddedHtml",
              "externalContent",
              "office365",
              "plan",
              "flexibleItems",
              "aiAssessmentAssistant",
              "aiChat",
              "marketplace",
              "settings",
              "initiatives",
              "agreements",
              "goals",
              "opportunities",
              "projects"
            ],
            "type": "string",
            "description": "Type of the module, as a camelCase string. May be returned as a NUMBER when the tenant's data contains a module type newer than the API revision serving the request (the database can be ahead of the code during a rolling deployment) — treat an unrecognized value as opaque and fall back to name/label.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A module assigned to the user. Only modules the user actually has, and only active ones —\nthe client's unassigned modules are not listed. UI render state (show, sort order, opening\naction) is deliberately not exposed."
      },
      "UserRelatedRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the related entity (see the resource's list endpoint).",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Name of the related entity.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A related lookup entity of a user (group, company or template) carrying the id needed to\nround-trip to its own list endpoint, alongside the display name."
      },
      "UserResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the user. A string GUID. Always returned.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Full name of the user (first and last name).",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Email address of the user.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the user is active.",
            "nullable": true
          },
          "isApiUser": {
            "type": "boolean",
            "description": "Whether the user is marked as an API user. Set only at user creation; read-only afterwards. Only present in the Full view.",
            "nullable": true
          },
          "role": {
            "$ref": "#/components/schemas/UserRoleRef"
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserRelatedRef"
            },
            "description": "Groups (territories) the user belongs to.",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "description": "First name of the user. Only present in the Full view.",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the user. Only present in the Full view.",
            "nullable": true
          },
          "position": {
            "type": "string",
            "description": "Job position of the user. Only present in the Full view.",
            "nullable": true
          },
          "lastLogin": {
            "type": "string",
            "description": "When the user last logged in. Only present in the Full view.",
            "format": "date-time",
            "nullable": true
          },
          "companies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserRelatedRef"
            },
            "description": "Companies assigned to the user. Only present in the Full view.",
            "nullable": true
          },
          "templates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserRelatedRef"
            },
            "description": "Templates assigned to the user. Only present in the Full view.",
            "nullable": true
          },
          "defaultUserTemplate": {
            "$ref": "#/components/schemas/UserRelatedRef"
          },
          "defaultUserGroup": {
            "$ref": "#/components/schemas/UserRelatedRef"
          },
          "modules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserModuleRef"
            },
            "description": "Active modules assigned to the user. Only present in the Full view.",
            "nullable": true
          },
          "phoneNumber": {
            "type": "string",
            "description": "Phone number of the user. Returned by getUser only — it is not a list field, not even under view=Full.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A user of the caller's client. Fields are omitted from the JSON when not selected via the\nfields/view parameters (only requested fields are returned; id is always present).\nThe user id is a string GUID, not an int."
      },
      "UserResourceExternalPagedResponse": {
        "required": [
          "items",
          "page"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserResource"
            },
            "description": "The current page of items.",
            "nullable": true
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lean list envelope for external endpoints: the items plus paging metadata."
      },
      "UserResourceExternalResponse": {
        "required": [
          "data"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UserResource"
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id for support; matches server-side logs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Single-resource envelope for external endpoints — the contract for EVERY single-resource 200,\nboth get-by-id and the create / update / patch / close echoes. Lists use ExternalPagedResponse and\nfailures use ExternalError, so no successful response is left without a correlation id an agent can\nquote back to support (defect B8). This reverses the earlier \"prefer the bare resource\" guidance."
      },
      "UserRoleRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the role. A string, not an int.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name of the role, for example Admin or Manager.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The role of a user. Singular: the application assigns exactly one role per user. The id is a\nstring, unlike the int ids of the other related entities."
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Please insert JWT with Bearer into field",
        "name": "Authorization",
        "in": "header"
      },
      "ApiKey": {
        "type": "apiKey",
        "description": "Personal API key, an alternative to the bearer token. Acts as the user the key belongs to.",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    },
    {
      "ApiKey": [ ]
    }
  ],
  "tags": [
    {
      "name": "Ai"
    },
    {
      "name": "Assessment"
    },
    {
      "name": "Companies"
    },
    {
      "name": "CompanyGroups"
    },
    {
      "name": "CompanyMarkets"
    },
    {
      "name": "CompanyStatuses"
    },
    {
      "name": "CompanyTypes"
    },
    {
      "name": "Goals"
    },
    {
      "name": "GoalTemplates"
    },
    {
      "name": "GroupTemplates"
    },
    {
      "name": "Initiatives"
    },
    {
      "name": "InitiativeTemplates"
    },
    {
      "name": "Integrations"
    },
    {
      "name": "Plans"
    },
    {
      "name": "PlanTemplates"
    },
    {
      "name": "Projects"
    },
    {
      "name": "Proposals"
    },
    {
      "name": "ReportInitiatives"
    },
    {
      "name": "ReportPlan"
    },
    {
      "name": "Reports"
    },
    {
      "name": "ReportTechnology"
    },
    {
      "name": "TechnologyGrades"
    },
    {
      "name": "TechnologyGroups"
    },
    {
      "name": "Users"
    }
  ]
}