{
  "openapi": "3.1.0",
  "info": {
    "title": "Paprel Public API",
    "version": "1.1.0",
    "description": "External gateway API. Access requires the documented token audience and permissions.",
    "termsOfService": "https://paprel.com/terms",
    "contact": {
      "name": "Paprel Support",
      "url": "https://paprel.com/contact",
      "email": "support@paprel.com"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://paprel.com/license"
    }
  },
  "paths": {
    "/v1/accounting/accounts": {
      "get": {
        "tags": [
          "Accounting / Accounts"
        ],
        "summary": "List Flat Chart of Accounts",
        "description": "Returns a comprehensive, flat-mapped registry of the organization's accounts. While this endpoint does not return a nested tree structure, each record includes its primary classification (Asset, Liability, etc.) and relational metadata (Parent ID), making it ideal for high-performance search, filtering, and data-table rendering.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:account-add, accounting:account-list, accounting:account-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_accounts",
        "parameters": [
          {
            "name": "is_archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get Accounts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_BankingAccountModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:account-add",
            "accounting:account-list",
            "accounting:account-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Accounting / Accounts"
        ],
        "summary": "Create Account",
        "description": "Adds a new account definition to the organization's financial registry. This process assigns the account to a specific classification (Asset, Liability, Equity, etc.) and establishes its position within the ledger hierarchy. Once created, the account becomes available for journal entries and financial reporting.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:account-add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "add_account",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankingAccountFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Account successfully registered and activated in the ledger",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingAccountDetailModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:account-add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/accounts-tree": {
      "get": {
        "tags": [
          "Accounting / Accounts"
        ],
        "summary": "Get Account Tree",
        "description": "Get Account Tree\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:account-add, accounting:account-list, accounting:account-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_account_tree",
        "parameters": [
          {
            "name": "is_archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get Account Tree",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_BankingAccountTypeModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:account-add",
            "accounting:account-list",
            "accounting:account-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/accounts/subtype": {
      "get": {
        "tags": [
          "Accounting / Accounts"
        ],
        "summary": "List Account Subtypes",
        "description": "Retrieves the standard library of account subtypes. These classifications provide a second-level layer of categorization (e.g., distinguishing 'Petty Cash' from 'Operating Bank Account') and are used to drive specific automated logic for tax mappings and financial statement grouping.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:account-list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_account_subtypes",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successfully retrieved the classification subtype registry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingAccountSubtypeListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:account-list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Accounting / Accounts"
        ],
        "summary": "Create Account Subtype",
        "description": "Registers a new account subtype within the system. This allows for more granular financial categorization beyond standard types. Subtypes created here will immediately become available in account creation forms, enabling precise tax mapping and balance sheet grouping.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:account-add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "add_account_subtype",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankingAccountSubtypeFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Subtype successfully registered and integrated into the classification engine",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingAccountSubtypeFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:account-add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/accounts/subtype/{account_id}": {
      "put": {
        "tags": [
          "Accounting / Accounts"
        ],
        "summary": "Update Account Subtype",
        "description": "Updates the metadata and classification logic for an existing account subtype. This action allows for the refinement of financial reporting categories without needing to reclassify individual accounts. **Note:** Updating a subtype's primary mapping will immediately reflect across all linked accounts in the Chart of Accounts and on generated financial statements.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:account-add, accounting:account-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "edit_account_subtype",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankingAccountSubtypeFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Subtype configuration successfully updated and propagated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingAccountSubtypeFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:account-add",
            "accounting:account-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/accounts/{id}": {
      "get": {
        "tags": [
          "Accounting / Accounts"
        ],
        "summary": "Get Account Profile",
        "description": "Provides a detailed view of a specific account, including its configuration metadata and real-time financial statistics. This view aggregates current balances, last activity dates, and period-over-period performance metrics, serving as the primary data source for Account Detail 'White Cards' in the dashboard.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:account-add, accounting:account-list, accounting:account-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_account_by_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved account profile with associated statistics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingAccountWithStats"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:account-add",
            "accounting:account-list",
            "accounting:account-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/accounts/{account_id}": {
      "put": {
        "tags": [
          "Accounting / Accounts"
        ],
        "summary": "Update Account",
        "description": "Updates the configuration of an existing account in the Chart of Accounts. Use this to adjust the account name, internal code, or re-parent it within the ledger hierarchy. **Note:** Changing an account's primary classification (e.g., Asset to Expense) is restricted if the account contains existing journal entries to prevent ledger corruption.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:account-add, accounting:account-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "edit_account",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "Unique identifier of the account to modify",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankingAccountFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Account configuration successfully updated and synced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingAccountDetailModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:account-add",
            "accounting:account-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Accounting / Accounts"
        ],
        "summary": "Delete Account",
        "description": "Permanent removal of an account from the Chart of Accounts. **Safety Restriction:** An account can only be deleted if it has a zero balance and no historical journal entries. If the account has transaction history, consider deactivating it via the Update endpoint instead to preserve the audit trail.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:account-delete, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_account",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "Unique identifier of the account to be removed",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Account successfully purged from the system registry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingAccountDeleteResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:account-delete",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/bank-accounts": {
      "get": {
        "tags": [
          "Accounting / Accounts"
        ],
        "summary": "List Bank & CC Accounts",
        "description": "Retrieves all high-liquidity accounts, including Bank Accounts (Checking/Savings) and Credit Cards. This endpoint provides specialized financial metadata such as current balances, currency types, and bank-specific identifiers required for cash flow monitoring and statement reconciliation.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:account-add, accounting:account-list, accounting:account-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_bank_cc_accounts",
        "parameters": [
          {
            "name": "is_archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get Bank Accounts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankAccountsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:account-add",
            "accounting:account-list",
            "accounting:account-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions": {
      "get": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "List accounting dimensions",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-list, accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "list_get_accounting_dimensions",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/DimensionStatus"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/components/schemas/DimensionScope"
                }
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Use values to include each dimension's values in the same response. Status applies to both definitions and nested values. More than 5,000 nested values returns DIMENSION_INCLUDE_LIMIT_EXCEEDED; use the paginated values endpoint instead.",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/components/schemas/DimensionInclude"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Page_Dimension"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-list",
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Create an accounting dimension",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_accounting_dimensions",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDimensionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Dimension"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/initialize": {
      "post": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Initialize default accounting dimensions",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "initialize",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_InitializeDimensionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/worklist": {
      "get": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "List posted records with missing dimensions",
        "description": "Posted records that have taggable revenue/expense lines without a value for at least one dimension, newest first, one row per record. module is documents (with doc_type invoice, bill or credit-note), expenses or journals (manual journals). Cursor-paged. The gateway checks the income-statement report permission (or role:admin). The backend additionally enforces the requested owner's list permission: invoice:list, bill:list, credit-note:list, expense:list, or accounting:journal-list. The x-hyperlane-auth metadata describes gateway checks only.\n\nHyperlane requires a bearer JWT. Required permissions (any): report:income-statement, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "list_get_accounting_dimensions_worklist",
        "parameters": [
          {
            "name": "module",
            "in": "query",
            "description": "`documents`, `expenses` or `journals`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "doc_type",
            "in": "query",
            "description": "`invoice`, `bill` or `credit-note`; required for `documents`, rejected otherwise.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "date_range",
            "in": "query",
            "description": "Required, `YYYY-MM-DD,YYYY-MM-DD`, inclusive, at most 366 days.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dimension_ids",
            "in": "query",
            "description": "Comma-separated dimension ids; absent means every active dimension enabled for transactions.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Page_DimensionWorklistItem"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "404": {
            "description": "Dimension not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:income-statement",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/worklist/summary": {
      "get": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Summarize posted records with missing dimensions",
        "description": "How many records need a value, in total, per record type and per dimension, by the same rule as the worklist. Requires the income-statement report permission.\n\nHyperlane requires a bearer JWT. Required permissions (any): report:income-statement, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "summary",
        "parameters": [
          {
            "name": "date_range",
            "in": "query",
            "description": "Required, `YYYY-MM-DD,YYYY-MM-DD`, inclusive, at most 366 days.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dimension_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionWorklistSummary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "404": {
            "description": "Dimension not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:income-statement",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/{dimension_id}": {
      "get": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Get an accounting dimension",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-list, accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "get_get_accounting_dimensions_dimension_id",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Dimension"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-list",
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "patch": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Update an accounting dimension",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_patch_accounting_dimensions_dimension_id",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDimensionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Dimension"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/{dimension_id}/account-lines": {
      "get": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "List account lines by dimension value",
        "description": "Cursor-paged lines of one account (newest first) with their current value for the dimension. value_id filters to a value (descendants included) or `unassigned`. Entry point for the account-detail list. Requires the general-ledger report permission.\n\nHyperlane requires a bearer JWT. Required permissions (any): report:general-ledger, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "account_lines",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "description": "Dimension id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_range",
            "in": "query",
            "description": "Required, `YYYY-MM-DD,YYYY-MM-DD`, inclusive, at most 366 days.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value_id",
            "in": "query",
            "description": "A value id (its descendants are included) or `unassigned`; omit for every line.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Page_DimensionAccountLine"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "404": {
            "description": "Dimension, account or value not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:general-ledger",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/{dimension_id}/archive": {
      "post": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Archive an accounting dimension",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "archive",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Dimension"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/{dimension_id}/income-statement": {
      "get": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Get income statement by dimension value",
        "description": "Income statement grouped by one dimension: direct and inclusive (descendant) amounts per value plus a computed Unassigned bucket whose total reconciles to the unfiltered statement. With value_id (a value id or `unassigned`) it drills into that selection's accounts. Requires the income-statement report permission.\n\nHyperlane requires a bearer JWT. Required permissions (any): report:income-statement, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "income_statement",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "description": "Dimension id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_range",
            "in": "query",
            "description": "Required, `YYYY-MM-DD,YYYY-MM-DD`, inclusive, at most 366 days.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value_id",
            "in": "query",
            "description": "Drill-down: a value id (its descendants are included) or `unassigned`.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionIncomeStatement"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "404": {
            "description": "Dimension or value not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:income-statement",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/{dimension_id}/restore-label": {
      "post": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Restore a dimension default label",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "restore_label",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Dimension"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/{dimension_id}/unarchive": {
      "post": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Unarchive an accounting dimension",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "unarchive",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Dimension"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/{dimension_id}/values": {
      "get": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "List dimension values",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-list, accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "list_values",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/DimensionStatus"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "parent_value_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "assignable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Page_DimensionValue"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-list",
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Create a dimension value",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_value",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDimensionValueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionValue"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/{dimension_id}/values/{value_id}": {
      "get": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Get a dimension value",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-list, accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "get_value",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionValue"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-list",
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "patch": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Update a dimension value",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_value",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDimensionValueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionValue"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/{dimension_id}/values/{value_id}/archive": {
      "post": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Archive a dimension value",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "archive_value",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionValue"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/{dimension_id}/values/{value_id}/restore-label": {
      "post": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Restore a dimension value default label",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "restore_label_value",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionValue"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/dimensions/{dimension_id}/values/{value_id}/unarchive": {
      "post": {
        "tags": [
          "Accounting / Dimensions"
        ],
        "summary": "Unarchive a dimension value",
        "description": "Tenant-scoped Dimensions operation. Dimensions are generally available. Returns DIMENSIONS_NOT_READY if dimensions are not enabled for the deployment. Requires dimension management permission for writes; list or management permission for reads.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:dimension-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "unarchive_value",
        "parameters": [
          {
            "name": "dimension_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionValue"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:dimension-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/expense-accounts": {
      "get": {
        "tags": [
          "Accounting / Accounts"
        ],
        "summary": "List Expense Accounts",
        "description": "Retrieves all accounts categorized as Expenses, including Operating Expenses (OPEX), Cost of Goods Sold (COGS), and Other Expenses. This endpoint is optimized for categorizing transactions that reduce equity, providing essential data for P&L reporting and budgetary control.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:account-add, accounting:account-list, accounting:account-edit, expense:add, expense:edit, expense:list, expense:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_expense_accounts",
        "parameters": [
          {
            "name": "is_archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List Expense Accounts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_BankingAccountModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:account-add",
            "accounting:account-list",
            "accounting:account-edit",
            "expense:add",
            "expense:edit",
            "expense:list",
            "expense:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/journals": {
      "get": {
        "tags": [
          "Accounting / Journals"
        ],
        "summary": "List Journal Entries",
        "description": "Lists current journal headers. Default (posted and void omitted) is posted journals plus the caller's own drafts; voided journals are excluded unless void=true. Supports filtering by date range, account, identifier, and related fields.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:journal-add, accounting:journal-edit, accounting:journal-list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "get_group_journals",
        "parameters": [
          {
            "name": "date_range",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "account",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "deleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "posted",
            "in": "query",
            "description": "When true, only posted journals. When omitted with `void`, the default\nlist is posted journals plus the caller's own drafts.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "void",
            "in": "query",
            "description": "When true, only voided journals. When omitted, voids are excluded.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "reversed",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "manual",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List Journals",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingJournalListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:journal-add",
            "accounting:journal-edit",
            "accounting:journal-list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Accounting / Journals"
        ],
        "summary": "Create Journal Entry",
        "description": "Registers a new double-entry journal transaction into the ledger. This process validates that debits and credits are balanced, assigns a unique transaction hash for the audit trail, and links the entry to the relevant fiscal period.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:journal-add, accounting:journal-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "add_journal",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankingJournalFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Create Journal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingJournalFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:journal-add",
            "accounting:journal-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/journals/for-entity": {
      "get": {
        "tags": [
          "Accounting / Journals"
        ],
        "summary": "Get Journal by Source Entity",
        "description": "Fetches the full journal entry associated with a specific root business entity (e.g., an Invoice, Payment, or Expense). This provides the underlying double-entry ledger details, including all debits and credits generated by the source document.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:journal-add, accounting:journal-edit, accounting:journal-list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "get_journal_by_root_entity_id",
        "parameters": [
          {
            "name": "entity_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity_type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_JournalDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:journal-add",
            "accounting:journal-edit",
            "accounting:journal-list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/journals/void": {
      "put": {
        "tags": [
          "Accounting / Journals"
        ],
        "summary": "Void Journal Entries (Batch)",
        "description": "Voids one or more journal entries. Marks them inactive, reverses their financial impact, and preserves the audit trail. Per-item outcomes (`success` / `error`) are returned in a 200 body: already-voided, locked, reconciled, not-found, and not-current do not abort the rest of the batch. Only an unexpected 5xx fails the request.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:journal-add, accounting:journal-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "void_journal",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoidJournalForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Void Journal Entries (Batch)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_JournalVoidResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:journal-add",
            "accounting:journal-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/journals/{anchor_id}": {
      "get": {
        "tags": [
          "Accounting / Journals"
        ],
        "summary": "Get Journal Entry",
        "description": "Returns a journal by its anchor_id. The response is the current version (id, version_number, is_current) plus a short version_history. Pass version to return one earlier version instead, by its version_number or by an id listed in version_history.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:journal-add, accounting:journal-edit, accounting:journal-list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "get_journal_by_id",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "description": "Stable journal anchor_id. The same value across every version of the journal; use it for links, edits, void and delete. Transitional: a version row id (any entry of version_history) is still resolved to its journal; that fallback will be removed in a later release, so send anchor_id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "description": "Earlier version to return: a version_number, or an id from version_history. Omit for the current version.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get Journal Entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_JournalDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:journal-add",
            "accounting:journal-edit",
            "accounting:journal-list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Accounting / Journals"
        ],
        "summary": "Update Journal Entry",
        "description": "Updates the current version of a journal, addressed by anchor_id. Drafts are edited in place. Posted journals reject operator edits; posted corrections require a dedicated versioned correction action. Re-validates double-entry balance, stamps the transaction hash, and enforces fiscal period locks.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:journal-add, accounting:journal-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "edit_journal",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "description": "Stable journal anchor_id. The same value across every version of the journal; use it for links, edits, void and delete. Transitional: a version row id (any entry of version_history) is still resolved to its journal; that fallback will be removed in a later release, so send anchor_id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankingJournalFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update Journal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingJournalFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:journal-add",
            "accounting:journal-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Accounting / Journals"
        ],
        "summary": "Delete Draft Journal",
        "description": "Permanently removes a draft journal, addressed by anchor_id. **Constraint:** only 'Draft' (unposted) journals can be deleted. Once posted, a journal cannot be deleted and must be voided instead to keep the audit chain.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:journal-delete, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "delete_journal",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "description": "Stable journal anchor_id. The same value across every version of the journal; use it for links, edits, void and delete. Transitional: a version row id (any entry of version_history) is still resolved to its journal; that fallback will be removed in a later release, so send anchor_id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete Journal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingJournalDeleteResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:journal-delete",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/journals/{anchor_id}/dimensions": {
      "put": {
        "tags": [
          "Accounting / Journals"
        ],
        "summary": "Correct Journal line dimensions",
        "description": "Changes the dimension values of a posted manual journal's lines and nothing else (amounts, accounts and dates cannot be sent). Each listed line gets exactly the values sent (an empty list clears it); lines not listed keep theirs. The journal is restated: the current version is frozen and a new version is minted on the same anchor with identical lines and the new resolved values, so line ids change. Send expected_version (the current version_number). Refused for voided, reconciled and system-generated journals. Transaction Locking applies as for an edit: a hard lock refuses the call, a soft lock lets a user with the bypass permission through and is logged.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:journal-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "correct_dimensions_put_accounting_journals_anchor_id_dimensions",
        "parameters": [
          {
            "name": "anchor_id",
            "in": "path",
            "description": "Stable journal anchor_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DimensionCorrectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Corrected",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionCorrectionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or lock error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Journal not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Version conflict, unknown line, or journal not correctable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:journal-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/match-policies": {
      "get": {
        "tags": [
          "Accounting / Transactions"
        ],
        "summary": "List Transaction Match Policies",
        "description": "Returns the available transaction matching policies for the authenticated company, including which policy is currently the company default.\n\nHyperlane requires a bearer JWT. Required permissions (any): role:admin, accounting:match-policy-apply, accounting:match-policy-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "list_get_accounting_match_policies",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Match policies retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingMatchPolicyListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "role:admin",
            "accounting:match-policy-apply",
            "accounting:match-policy-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/match-policies/default": {
      "put": {
        "tags": [
          "Accounting / Transactions"
        ],
        "summary": "Set Default Transaction Match Policy",
        "description": "Persists the authenticated company's default transaction matching policy used by the core deterministic engine whenever a runtime override is not supplied.\n\nHyperlane requires a bearer JWT. Required permissions (any): role:admin, accounting:match-policy-manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "set_default",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankingMatchPolicySettingFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Default match policy updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingMatchPolicySettingModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "role:admin",
            "accounting:match-policy-manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/reconciliations": {
      "get": {
        "tags": [
          "Accounting / Reconciliations"
        ],
        "summary": "List Reconciliations",
        "description": "Retrieves a history of bank reconciliation periods. This endpoint provides the audit trail for verified ledger accuracy, including opening/closing balances and status indicators. Essential for identifying discrepancies between internal books and external bank statements to ensure financial integrity.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-reconcile, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_reconciliations",
        "parameters": [
          {
            "name": "date_range",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "account",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of reconciliation periods retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingReconciliationListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-reconcile",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Accounting / Reconciliations"
        ],
        "summary": "Create Reconciliation",
        "description": "Initiates or finalizes a bank reconciliation record. This endpoint maps the user-provided statement balance against the system-calculated book balance to determine discrepancies. Successful submission validates the integrity of the ledger for the specified date range and updates the reconciliation status.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-reconcile, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_reconciliation",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReconciliationFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Reconciliation record created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReconciliationFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-reconcile",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/reconciliations/{reconciliation_id}": {
      "get": {
        "tags": [
          "Accounting / Reconciliations"
        ],
        "summary": "Get Reconciliation Details",
        "description": "Retrieves a single bank reconciliation record by its unique identifier. This provides the full audit context, including the calculated ledger balance, the user-entered statement balance, and the resulting discrepancy ('diff').\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-reconcile, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_reconciliation_by_id",
        "parameters": [
          {
            "name": "reconciliation_id",
            "in": "path",
            "description": "Unique identifier of the reconciliation record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reconciliation details retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingReconciliationModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Reconciliation record not found"
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-reconcile",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Accounting / Reconciliations"
        ],
        "summary": "Update Reconciliation",
        "description": "Modifies an existing bank reconciliation record. Use this to update the closing balance, notes, or transition the status. Updating a record recalculates the discrepancy ('diff') between the statement and ledger, ensuring the audit trail remains accurate before finalization.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-reconcile, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "edit_basic_reconciliation",
        "parameters": [
          {
            "name": "reconciliation_id",
            "in": "path",
            "description": "Unique identifier of the reconciliation record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReconciliationFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Reconciliation record updated and recalculated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReconciliationFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Reconciliation record not found"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-reconcile",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Accounting / Reconciliations"
        ],
        "summary": "Delete Reconciliation",
        "description": "Permanently removes a reconciliation record from the system. This is intended for deleting draft or erroneous entries that have not been finalized. If the reconciliation was already posted, this operation will unlock linked transactions, but unlike 'Void', it may remove the audit history of this specific attempt.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-reconcile, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_reconciliation",
        "parameters": [
          {
            "name": "reconciliation_id",
            "in": "path",
            "description": "Unique identifier of the reconciliation record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reconciliation record permanently deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReconciliationFormResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Reconciliation record not found"
          },
          "409": {
            "description": "Conflict: Cannot delete a finalized reconciliation; use the 'Void' endpoint instead to preserve audit logs"
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-reconcile",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/reconciliations/{reconciliation_id}/save": {
      "put": {
        "tags": [
          "Accounting / Reconciliations"
        ],
        "summary": "Confirm & Post Reconciliation",
        "description": "Finalizes the reconciliation by updating the record and generating the necessary journal entries to bridge discrepancies. This endpoint automates the transition from ledger balance to bank statement balance, ensuring the general ledger is synchronized. Re-saving will recalculate the difference and update the linked journal records.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-reconcile, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "confirm_reconciliation",
        "parameters": [
          {
            "name": "reconciliation_id",
            "in": "path",
            "description": "Unique identifier of the reconciliation record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReconciliationConfirmFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Reconciliation confirmed and journals posted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReconciliationFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Reconciliation record not found"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-reconcile",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/reconciliations/{reconciliation_id}/void": {
      "put": {
        "tags": [
          "Accounting / Reconciliations"
        ],
        "summary": "Void Reconciliation",
        "description": "Voids a finalized reconciliation record and unlocks the associated bank transactions for re-editing. This operation may also reverse any linked journal adjustments created during the finalization process. Essential for correcting historical errors while maintaining a clear audit trail of the voided state.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-reconcile, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "void_reconciliation",
        "parameters": [
          {
            "name": "reconciliation_id",
            "in": "path",
            "description": "Unique identifier of the reconciliation record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReconciliationVoidFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Reconciliation record successfully voided and transactions unlocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ReconciliationFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Forbidden: Cannot void a reconciliation that has been officially closed in a prior fiscal year"
          },
          "404": {
            "description": "Reconciliation record not found"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-reconcile",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/transactions": {
      "get": {
        "tags": [
          "Accounting / Transactions"
        ],
        "summary": "List Bank Transactions",
        "description": "Retrieves a detailed list of bank and ledger transactions. This endpoint provides the raw financial data required for reconciliation and P&L reporting, including transaction dates, descriptions, amounts, and categorization status. Supports filtering by date range and account type to facilitate precise audit lookups.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-add, accounting:banking-transaction-edit, accounting:banking-transaction-list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_transactions",
        "parameters": [
          {
            "name": "match_policy_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "date_range",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "account",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "excluded",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "posted",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "reconciled",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of bank transactions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingTransactionListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-add",
            "accounting:banking-transaction-edit",
            "accounting:banking-transaction-list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/transactions/confirm-match": {
      "post": {
        "tags": [
          "Accounting / Transactions"
        ],
        "summary": "Confirm Transaction Match",
        "description": "Links a bank transaction to a specific ledger entity (Invoice, Bill, or Journal). This action validates the suggested match, updates the 'is_reconciled' status, and ensures the transaction is correctly allocated within the general ledger. Essential for finalizing automated or manual bank feed matching.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-add, accounting:banking-transaction-edit, accounting:banking-transaction-category, accounting:banking-transaction-reconcile, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "confirm_match_transaction",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionConfirmFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Transaction match confirmed and ledger synchronized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BankingTransactionDbModel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid match: Amount mismatch or entity already linked"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Transaction or Target Entity not found"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-add",
            "accounting:banking-transaction-edit",
            "accounting:banking-transaction-category",
            "accounting:banking-transaction-reconcile",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/transactions/exclude": {
      "post": {
        "tags": [
          "Accounting / Transactions"
        ],
        "summary": "Exclude Transactions",
        "description": "Marks one or more bank transactions as 'Ignored'. This prevents them from appearing in reconciliation queues or financial reports. Used for non-business expenses or duplicate entries. A mandatory 'reason' must be provided to maintain an audit-compliant history of why these records were bypassed.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-add, accounting:banking-transaction-edit, accounting:banking-transaction-category, accounting:banking-transaction-reconcile, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "exclude_transactions",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionExcludeFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Transactions successfully excluded and moved to ignored status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_u64"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Request: Missing mandatory exclusion reason"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Forbidden: Cannot exclude transactions belonging to another organization"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-add",
            "accounting:banking-transaction-edit",
            "accounting:banking-transaction-category",
            "accounting:banking-transaction-reconcile",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/transactions/find-group-match": {
      "post": {
        "tags": [
          "Accounting / Transactions"
        ],
        "summary": "Match Grouped Transactions",
        "description": "Executes a complex reconciliation by linking one or more bank transactions to multiple ledger entities (Invoices, Bills, or Credits). This endpoint validates that the total sum of all selected transactions matches the total allocated amount of the target entities, ensuring the ledger remains balanced across batch payments.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-add, accounting:banking-transaction-edit, accounting:banking-transaction-category, accounting:banking-transaction-reconcile, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "match_group_transactions",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MatchGroupTransactionModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Group match successfully validated and ledger records linked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MatchGroupTransactionResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Mathematical mismatch: Total transaction sum does not equal total entity allocation"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity: One or more records are already reconciled or locked"
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-add",
            "accounting:banking-transaction-edit",
            "accounting:banking-transaction-category",
            "accounting:banking-transaction-reconcile",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/transactions/restore": {
      "post": {
        "tags": [
          "Accounting / Transactions"
        ],
        "summary": "Restore Transactions",
        "description": "Reverses the 'Ignored' status for one or more bank transactions. This action reinstates the records into the active reconciliation queue and includes them in financial reporting once again. Use this to correct accidental exclusions or when a previously ignored transaction is identified as a valid business expense.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-add, accounting:banking-transaction-edit, accounting:banking-transaction-category, accounting:banking-transaction-reconcile, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "restore_transactions",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionRestoreFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Transactions successfully restored to active status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_u64"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Forbidden: Unauthorized access to specified transaction records"
          },
          "404": {
            "description": "Not Found: One or more transaction IDs do not exist"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-add",
            "accounting:banking-transaction-edit",
            "accounting:banking-transaction-category",
            "accounting:banking-transaction-reconcile",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/transactions/revert": {
      "post": {
        "tags": [
          "Accounting / Transactions"
        ],
        "summary": "Revert Transaction Match",
        "description": "Disconnects a bank transaction from its linked ledger entities (Invoices, Bills, or Journal Entries). This action resets the 'is_reconciled' status to false and removes associated mappings, effectively returning the transaction to the 'Unmatched' queue for re-categorization. Essential for correcting matching errors after they have been confirmed.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-add, accounting:banking-transaction-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "revert_transactions",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionRevertFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Transaction mappings successfully removed and status reset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_u64"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Not Found: Transaction ID or mapping record not found"
          },
          "409": {
            "description": "Conflict: Cannot revert a transaction that is part of a locked reconciliation period"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-add",
            "accounting:banking-transaction-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/accounting/transactions/{transaction_id}": {
      "get": {
        "tags": [
          "Accounting / Transactions"
        ],
        "summary": "Get Transaction Detail",
        "description": "Retrieves the full profile of a specific bank transaction, including its ledger mappings and allocation history. This endpoint reveals how an amount is split across different entities (Invoices, Bills, or Expenses), providing the granular audit trail necessary for precise financial reconciliation.\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:banking-transaction-add, accounting:banking-transaction-edit, accounting:banking-transaction-list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_transaction_detail",
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "description": "Unique identifier of the bank transaction",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction details and entity mappings retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TransactionDetailModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Transaction not found"
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:banking-transaction-add",
            "accounting:banking-transaction-edit",
            "accounting:banking-transaction-list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/acl/module": {
      "get": {
        "tags": [
          "Access & Permissions"
        ],
        "summary": "Get Modules List",
        "description": "Get Modules List\n\nHyperlane requires a bearer JWT. Required permissions (any): staff-role:list, staff-role:add, staff-role:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_acl_modules",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get Modules List",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AclModuleListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "staff-role:list",
            "staff-role:add",
            "staff-role:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/acl/permission": {
      "get": {
        "tags": [
          "Access & Permissions"
        ],
        "summary": "Get Modules Permissions",
        "description": "Get Modules Permissions\n\nHyperlane requires a bearer JWT. Required permissions (any): staff-role:list, staff-role:add, staff-role:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_acl_module_permissions",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get Modules Permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_String"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "staff-role:list",
            "staff-role:add",
            "staff-role:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/acl/role": {
      "post": {
        "tags": [
          "Access & Permissions"
        ],
        "summary": "Create Acl Role",
        "description": "Create Acl Role\n\nHyperlane requires a bearer JWT. Required permissions (any): staff-role:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_acl_role",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AclCompanyRoleFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Create Acl Role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AclCompanyRoleFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "staff-role:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/acl/role/{id}": {
      "get": {
        "tags": [
          "Access & Permissions"
        ],
        "summary": "Acl Role Detail",
        "description": "Acl Role Detail\n\nHyperlane requires a bearer JWT. Required permissions (any): staff-role:list, staff-role:add, staff-role:edit, staff-role:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "role_detail",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Acl Role Detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AclCompanyRolePermission"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "staff-role:list",
            "staff-role:add",
            "staff-role:edit",
            "staff-role:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Access & Permissions"
        ],
        "summary": "Update Acl Role",
        "description": "Update Acl Role\n\nHyperlane requires a bearer JWT. Required permissions (any): staff-role:add, staff-role:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_acl_role_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AclCompanyRoleFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update Acl Role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AclCompanyRoleFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "staff-role:add",
            "staff-role:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Access & Permissions"
        ],
        "summary": "Delete Acl Role",
        "description": "Delete Acl Role\n\nHyperlane requires a bearer JWT. Required permissions (any): staff-role:delete, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_delete_acl_role_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete Acl Role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AclCompanyRoleFormResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "staff-role:delete",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/action-confirmation/email-code": {
      "post": {
        "tags": [
          "Action Verification"
        ],
        "summary": "Send public email action confirmation code",
        "description": "Send public email action confirmation code",
        "operationId": "send_public_email_code",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicEmailConfirmationCodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Confirmation code queued successfully"
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": false
        }
      }
    },
    "/v1/action-confirmation/me/email-code": {
      "post": {
        "tags": [
          "Action Verification"
        ],
        "summary": "Send authenticated email action confirmation code",
        "description": "Send authenticated email action confirmation code\n\nHyperlane requires a bearer JWT. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "send_authenticated_email_code",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthenticatedEmailConfirmationCodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Confirmation code queued successfully"
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true
        }
      }
    },
    "/v1/activity": {
      "get": {
        "tags": [
          "Audit Activity"
        ],
        "summary": "activity list",
        "description": "activity list\n\nHyperlane requires a bearer JWT. Required permissions (any): activity:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "activity_list",
        "parameters": [
          {
            "name": "entity_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "created_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "module",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "event",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "source_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "app_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "app_connect_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of user activities fetched successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityListResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid activity filters or cursor"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "activity:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/activity/entity": {
      "get": {
        "tags": [
          "Audit Activity"
        ],
        "summary": "entity activity",
        "description": "entity activity\n\nHyperlane requires a bearer JWT. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "entity_activity",
        "parameters": [
          {
            "name": "entity_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "module",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Entity-specific activity logs fetched successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityActivityListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true
        }
      }
    },
    "/v1/app-connect/app-clients": {
      "get": {
        "tags": [
          "App Connect"
        ],
        "summary": "List App Clients",
        "description": "List App Clients\n\nHyperlane requires a bearer JWT. Required permissions (any): app-connect:view, app-connect:list, app-connect:add, app-connect:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "list_get_app_connect_app_clients",
        "parameters": [],
        "responses": {
          "200": {
            "description": "App clients listed successfully"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-connect:view",
            "app-connect:list",
            "app-connect:add",
            "app-connect:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "App Connect"
        ],
        "summary": "Create App Client",
        "description": "Create App Client\n\nHyperlane requires a bearer JWT. Required permissions (any): app-connect:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_app_connect_app_clients",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAppClientFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "App client created successfully"
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-connect:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/app-connect/app-clients/{id}": {
      "get": {
        "tags": [
          "App Connect"
        ],
        "summary": "Get App Client Detail",
        "description": "Get App Client Detail\n\nHyperlane requires a bearer JWT. Required permissions (any): app-connect:view, app-connect:list, app-connect:add, app-connect:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "detail_get_app_connect_app_clients_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "App client detail fetched successfully"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-connect:view",
            "app-connect:list",
            "app-connect:add",
            "app-connect:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/app-connect/app-clients/{id}/delete": {
      "post": {
        "tags": [
          "App Connect"
        ],
        "summary": "Delete App Client",
        "description": "Delete App Client\n\nHyperlane requires a bearer JWT. Required permissions (any): app-connect:delete, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "delete_post_app_connect_app_clients_id_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppConnectActionConfirmationForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "App client deleted successfully"
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-connect:delete",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/app-connect/app-clients/{id}/restore": {
      "post": {
        "tags": [
          "App Connect"
        ],
        "summary": "Restore Revoked App Client",
        "description": "Restore Revoked App Client\n\nHyperlane requires a bearer JWT. Required permissions (any): app-connect:restore, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "restore",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppConnectActionConfirmationForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "App client restored successfully"
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-connect:restore",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/app-connect/app-clients/{id}/revoke": {
      "post": {
        "tags": [
          "App Connect"
        ],
        "summary": "Revoke App Client",
        "description": "Revoke App Client\n\nHyperlane requires a bearer JWT. Required permissions (any): app-connect:revoke, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "revoke",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppConnectActionConfirmationForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "App client revoked successfully"
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-connect:revoke",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/app-connect/app-clients/{id}/rotate": {
      "post": {
        "tags": [
          "App Connect"
        ],
        "summary": "Rotate App Client Secret",
        "description": "Rotate App Client Secret\n\nHyperlane requires a bearer JWT. Required permissions (any): app-connect:rotate, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "rotate_secret",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppConnectActionConfirmationForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "App client secret rotated successfully"
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-connect:rotate",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/.well-known/oauth-authorization-server": {
      "get": {
        "tags": [
          "App Connect"
        ],
        "summary": "Get OAuth Authorization Server Metadata",
        "description": "Get OAuth Authorization Server Metadata",
        "operationId": "oauth_authorization_server_metadata",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OAuth authorization server metadata fetched successfully"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [],
        "x-hyperlane-auth": {
          "bearer": false
        }
      }
    },
    "/.well-known/oauth-protected-resource": {
      "get": {
        "tags": [
          "App Connect"
        ],
        "summary": "Get OAuth Protected Resource Metadata",
        "description": "Get OAuth Protected Resource Metadata",
        "operationId": "oauth_protected_resource_metadata",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OAuth protected resource metadata fetched successfully"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [],
        "x-hyperlane-auth": {
          "bearer": false
        }
      }
    },
    "/oauth/authorize": {
      "get": {
        "tags": [
          "App Connect"
        ],
        "summary": "Authorize OAuth Client",
        "description": "Authorize OAuth Client\n\nHyperlane requires a bearer JWT. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "oauth_authorize_client",
        "parameters": [],
        "responses": {
          "302": {
            "description": "OAuth authorization code issued successfully"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true
        }
      }
    },
    "/v1/app-connect/oauth/authorize/preview": {
      "get": {
        "tags": [
          "App Connect"
        ],
        "summary": "Preview OAuth Authorization Request",
        "description": "Preview OAuth Authorization Request\n\nHyperlane requires a bearer JWT. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "oauth_authorization_preview",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OAuth authorization request preview fetched successfully"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true
        }
      }
    },
    "/v1/app-connect/oauth/register": {
      "post": {
        "tags": [
          "App Connect"
        ],
        "summary": "Register OAuth Client",
        "description": "Register OAuth Client",
        "operationId": "oauth_register_client",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthClientRegistrationFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OAuth client registered successfully"
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": false
        }
      }
    },
    "/v1/app-connect/oauth/token": {
      "post": {
        "tags": [
          "App Connect"
        ],
        "summary": "OAuth Token Exchange",
        "description": "Server-to-server client credentials exchange. Call this operation only from a partner BFF; never expose client_secret to browser code.",
        "operationId": "oauth_token_exchange",
        "parameters": [
          {
            "name": "x-partner-domain",
            "in": "header",
            "description": "Partner application domain registered for the App Connect client.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "grant_type",
                  "client_id",
                  "client_secret"
                ],
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "enum": [
                      "client_credentials"
                    ]
                  },
                  "client_id": {
                    "type": "string"
                  },
                  "client_secret": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OAuth token issued successfully"
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "App Connect client credentials are invalid or unauthorized."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "x-hyperlane-auth": {
          "bearer": false
        }
      }
    },
    "/v1/app-connect/oauth/token/validate": {
      "post": {
        "tags": [
          "App Connect"
        ],
        "summary": "Validate App Connect OAuth Access Token",
        "description": "Validate App Connect OAuth Access Token",
        "operationId": "oauth_validate_token",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateAppTokenFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OAuth access token validated successfully"
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": false
        }
      }
    },
    "/v1/bills": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List Bill",
        "description": "List {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, bill:list, bill:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_bills",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "vendor",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "issue_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "recurring",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of documents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_DocumentListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "bill:list",
            "bill:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Bills"
        ],
        "summary": "Create Bill",
        "description": "Create {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_bills",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Create a new document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/setting/status": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "Get All Status",
        "description": "Get All Status\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, bill:view, bill:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_all_status_get_bills_setting_status",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get All Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "bill:view",
            "bill:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Bills"
        ],
        "summary": "Add New Status",
        "description": "Add New Status\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "document_status_post_bills_setting_status",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add New Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/attribute": {
      "put": {
        "tags": [
          "Bills"
        ],
        "summary": "Bulk Update Attributes",
        "description": "Bulk Update Attributes\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "attr_update_put_bills_attribute",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentAttrFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Bulk update attributes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentAttrFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/setting": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "Get Settings",
        "description": "Get Settings\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, bill:list, bill:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_document_setting_get_bills_setting",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSettingModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "bill:list",
            "bill:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Bills"
        ],
        "summary": "Save Settings",
        "description": "Save Settings\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, bill:list, bill:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "save_document_setting_put_bills_setting",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Save Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSettingModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "bill:list",
            "bill:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/setting/state-transition": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "Get Transitions",
        "description": "Get Transitions\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, bill:list, bill:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_state_transition_get_bills_setting_state_transition",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get Transitions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_TransitionListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "bill:list",
            "bill:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/setting/state-transition/ledger-effects": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List ledger effects for a document type",
        "description": "Returns the LedgerEffect enum variants available for this document type. Workflow forms should load the dropdown from this list rather than hardcoding values.\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, bill:list, bill:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "get_ledger_effect_options_get_bills_setting_state_transition_ledger_effects",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Available ledger effects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_LedgerEffectOption"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "bill:list",
            "bill:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/setting/status/{id}": {
      "put": {
        "tags": [
          "Bills"
        ],
        "summary": "Update Status",
        "description": "Update Status\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_document_status_put_bills_setting_status_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Bills"
        ],
        "summary": "Delete Status",
        "description": "Delete Status\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_status_delete_bills_setting_status_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/{id}": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "Get Bill",
        "description": "Get {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, bill:list, bill:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_document_by_anchor_get_bills_id",
        "parameters": [
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get document detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_Vec_DocumentDetailModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "bill:list",
            "bill:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Bills"
        ],
        "summary": "Update Bill",
        "description": "Update {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_bills_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update the document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/{id}/comment": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "List comment",
        "description": "List comment\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, bill:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_comment_get_bills_id_comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_DocumentCommentModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "bill:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Bills"
        ],
        "summary": "Add comment",
        "description": "Add comment\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, bill:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "add_comment_post_bills_id_comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentCommentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_DocumentCommentModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "bill:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/{id}/comment/{comment_id}": {
      "delete": {
        "tags": [
          "Bills"
        ],
        "summary": "Delete comment",
        "description": "Delete comment\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_comment_delete_bills_id_comment_comment_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_DocumentCommentDeleteModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/{id}/dimensions": {
      "put": {
        "tags": [
          "Bills"
        ],
        "summary": "Correct Bill line dimensions",
        "description": "Changes the dimension values of an issued document's lines and nothing else (amounts, accounts, taxes and dates cannot be sent). Each listed line gets exactly the values sent (an empty list clears it); lines not listed keep theirs. The document's current version is updated in place and its journal re-posted with the new resolved values. Send expected_version (the current version_number). Transaction Locking applies as for an edit: a hard lock refuses the call, a soft lock lets a user with the bypass permission through and is logged.\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "correct_dimensions_put_bills_id_dimensions",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DimensionCorrectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Corrected",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionCorrectionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or lock error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Document not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Version conflict, unknown line, or document not issued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/{id}/mail/send": {
      "post": {
        "tags": [
          "Bills"
        ],
        "summary": "Send via Email",
        "description": "Send via Email\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:send, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "send_mail_post_bills_id_mail_send",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentMailFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Send Email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentMailFromResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:send",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/{id}/mail/{template_id}": {
      "get": {
        "tags": [
          "Bills"
        ],
        "summary": "Get Mail Content",
        "description": "Get Mail Content\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:send, bill:edit, bill:list, bill:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_email_template_get_bills_id_mail_template_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get Mail Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailTemplateTypeModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:send",
            "bill:edit",
            "bill:list",
            "bill:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/{id}/meta-data": {
      "post": {
        "tags": [
          "Bills"
        ],
        "summary": "Update meta data",
        "description": "Update meta data\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "meta_data_post_bills_id_meta_data",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentMetaData"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update meta data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/{id}/payment": {
      "post": {
        "tags": [
          "Bills"
        ],
        "summary": "Add Bill Payment",
        "description": "Payment and required settlement/FX effects commit together. Optional Idempotency-Key (1–128 characters) is company-scoped: identical retries return the recorded payment, including its reversal state; changed details return 409. Without a key each request is a new payment. References remain free-form.\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "save_payment_post_bills_id_payment",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Stable client request identity; reuse only for identical retries",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add payment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentFromResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/{id}/payment/{payment_id}": {
      "delete": {
        "tags": [
          "Bills"
        ],
        "summary": "Delete Bill Payment",
        "description": "Delete {{document_type}} Payment\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_payment_delete_bills_id_payment_payment_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete payment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentFromResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/bills/{id}/state-transition": {
      "put": {
        "tags": [
          "Bills"
        ],
        "summary": "Status Transition",
        "description": "Status Transition\n\nHyperlane requires a bearer JWT. Required permissions (any): bill:add, bill:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "transition_to_put_bills_id_state_transition",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransitionFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Status Transition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "bill:add",
            "bill:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/clients": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "List Client",
        "description": "List {{people_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): client:add, client:edit, client:list, client:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_clients",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "deleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of people (Clients/Vendors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "client:add",
            "client:edit",
            "client:list",
            "client:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Create Client",
        "description": "Create {{people_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): client:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_clients",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeopleFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Create people (Clients/Vendors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "client:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/clients/dimension-defaults/lookup": {
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Look up Client default dimensions",
        "description": "Batch read of the default dimension values saved on up to 100 clients or vendors, one call instead of one detail read per contact. A read sent as POST because the ids do not fit a query string. One entry per requested id, in request order; a contact with none, or an id that is not this tenant's contact of the asked type, has an empty state. The items list is empty while Dimensions is not activated, like the contact detail.\n\nHyperlane requires a bearer JWT. Required permissions (any): client:add, client:edit, client:list, client:view, invoice:add, invoice:edit, invoice:list, invoice:view, quote:add, quote:edit, quote:list, quote:view, credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "dimension_defaults_lookup_post_clients_dimension_defaults_lookup",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefaultsLookupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Defaults per contact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DefaultsLookupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Unknown people type, empty list, more than 100 ids, or a blank id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "client:add",
            "client:edit",
            "client:list",
            "client:view",
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/clients/get-all": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "List All Client",
        "description": "List All {{people_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:list, invoice:view, quote:add, quote:edit, quote:list, quote:view, credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_all_people_get_clients_get_all",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get all of people (Clients/Vendors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleFullListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/clients/{id}": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "Get Client",
        "description": "Get {{people_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): client:add, client:edit, client:list, client:view, invoice:add, invoice:edit, invoice:list, invoice:view, quote:add, quote:edit, quote:list, quote:view, credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "detail_get_clients_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get people detail (Clients/Vendors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleDetailResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "client:add",
            "client:edit",
            "client:list",
            "client:view",
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Clients"
        ],
        "summary": "Update Client",
        "description": "Update {{people_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): client:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_clients_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeopleFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update people (Clients/Vendors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "client:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Clients"
        ],
        "summary": "Delete Client",
        "description": "Delete {{people_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): client:delete, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_delete_clients_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete people (Clients/Vendors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleDeleteResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "client:delete",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company": {
      "post": {
        "tags": [
          "Company"
        ],
        "summary": "Create Company",
        "description": "Creates a new company profile under the authenticated user. Also provisions a trial subscription for the newly created company.\n\nHyperlane requires a bearer JWT. Required permissions (any): company:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_company",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Company successfully created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "company:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "get": {
        "tags": [
          "Company"
        ],
        "summary": "Get Company by ID",
        "description": "Retrieves the full company profile by its unique identifier, including attributes and subscription information.\n\nHyperlane requires a bearer JWT. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_company_by_id",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Company detail retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDetailResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Company not found"
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true
        }
      },
      "put": {
        "tags": [
          "Company"
        ],
        "summary": "Update Company",
        "description": "Updates an existing company profile. Validates all required fields before persisting changes.\n\nHyperlane requires a bearer JWT. Required permissions (any): company:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "update_put_company",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Company successfully updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyUpdateResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "company:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/banks": {
      "get": {
        "tags": [
          "Company / Payment Instructions"
        ],
        "summary": "List Company Bank Accounts",
        "description": "Retrieves a paginated list of the organization's registered bank accounts and payment instructions. Used primarily for populating payout destinations and internal treasury management views.\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:view, company:edit, app-setting:banks, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_company_banks",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of bank accounts retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyBankListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:view",
            "company:edit",
            "app-setting:banks",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Company / Payment Instructions"
        ],
        "summary": "Create Bank Account",
        "description": "Creates a new set of payment instructions within the organization's profile. Validates provided financial identifiers (IBAN, Account Number) before committing to the secure ledger.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:banks, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_company_banks",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyBankFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Bank account successfully created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyBankDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:banks",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/banks/{id}": {
      "get": {
        "tags": [
          "Company / Payment Instructions"
        ],
        "summary": "Get Bank Account",
        "description": "Returns the comprehensive metadata for a specific bank account, including routing numbers, SWIFT/BIC codes, and currency constraints. Essential for validating high-value disbursement tasks.\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:view, company:banks, company:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "detail_get_company_banks_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bank account detail retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyBankDetailResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Bank account not found"
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:view",
            "company:banks",
            "company:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Company / Payment Instructions"
        ],
        "summary": "Update Bank Account",
        "description": "Modifies existing payment instructions. This endpoint performs full schema validation to ensure that updated routing or account details maintain data integrity for future bank reconciliations.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:banks, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_company_banks_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyBankFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Bank account successfully updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyBankDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:banks",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/connections": {
      "get": {
        "tags": [
          "Company / Connections"
        ],
        "summary": "List Company Connections",
        "description": "Retrieves all company-to-company connection mappings for the specified receiver company, enriched with company metadata.\n\nHyperlane requires a bearer JWT. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_company_connections",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of connections retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyMappingListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true
        }
      }
    },
    "/v1/company/connections/{id}": {
      "put": {
        "tags": [
          "Company / Connections"
        ],
        "summary": "Update Connection Status",
        "description": "Updates the status of a company-to-company connection mapping (e.g., accept or reject a connection request).\n\nHyperlane requires a bearer JWT. Required permissions (any): company:add, company:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "update_connection_status",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyCompanyStatusUpdateFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Connection status updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyMappingDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "company:add",
            "company:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/currency": {
      "get": {
        "tags": [
          "Company / Currency"
        ],
        "summary": "List Company Currencies",
        "description": "Retrieves all currencies configured for the specified company, including default currency and symbol information.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:currency, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_all",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of currencies retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyCurrencyListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:currency",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Company / Currency"
        ],
        "summary": "Save Company Currencies",
        "description": "Saves one or more currencies to the company's profile. Validates currency codes before persisting.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:currency, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "save",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyCurrencyFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Currencies saved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyCurrencyListResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:currency",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/currency-rates": {
      "get": {
        "tags": [
          "Company / Currency FX"
        ],
        "summary": "List Custom FX Rate Windows",
        "description": "Lists a company's custom FX rate windows (current, upcoming, expired). Tenant is derived from the auth context; automatic currencies are not returned as rows. Ordered by status (current, upcoming, expired), pair, then effective_from descending.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:currency, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "list_get_company_currency_rates",
        "parameters": [
          {
            "name": "base",
            "in": "query",
            "description": "Base currency (ISO 4217).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target",
            "in": "query",
            "description": "Target currency (ISO 4217).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "description": "Matches either side of the pair (ISO 4217).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "`active` (current + upcoming) | `current` | `upcoming` | `expired` | `all` (default `active`). Anything else is 400 `INVALID_FILTER`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deleted",
            "in": "query",
            "description": "`active` | `deleted` | `all` (default `active`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_deleted",
            "in": "query",
            "description": "Compatibility alias for `deleted=all`. Must not contradict `deleted`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page_number",
            "in": "query",
            "description": "1-based page number. Omitted or zero values use page 1.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 1,
              "minimum": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Page size. Omitted or zero values use 20; values above 100 are capped at 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 20,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Custom FX windows retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyFxRateListResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_FILTER: invalid currency code, status or deleted filter, or conflicting include_deleted and deleted values"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:currency",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Company / Currency FX"
        ],
        "summary": "Set Custom FX Rate",
        "description": "Creates a custom FX rate window (`1 target = exchange_rate company-base`) for a currency already added to the company. Dates are `YYYY-MM-DD` in the company timezone; `effective_to` is inclusive. Overlapping windows are rejected with `OVERLAPPING_FX_WINDOW` (details: `conflicting_id`, `replaceable`), except that `replace_open_ended: true` ends a single covering open-ended window the day before the new start (or retires it when it starts the same day).\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:currency, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_company_currency_rates",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyFxRateCreateForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Custom FX window created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyFxRateModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:currency",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/currency-rates/history": {
      "get": {
        "tags": [
          "Company / Currency FX"
        ],
        "summary": "Custom FX Rate Change History",
        "description": "Audit trail of custom FX rate changes (created, updated, ended, deleted), newest first, from the activity log. Requires only the currency settings permission, not the general activity feed. Dates are company-local `YYYY-MM-DD`.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:currency, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "history",
        "parameters": [
          {
            "name": "currency",
            "in": "query",
            "description": "Only changes to windows of this currency (ISO 4217).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_number",
            "in": "query",
            "description": "1-based page number. Omitted or zero values use page 1.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 1,
              "minimum": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Page size. Omitted or zero values use 20; values above 100 are capped at 100.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 20,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Change history retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyFxRateHistoryResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:currency",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/currency-rates/{currency}/switch-automatic": {
      "post": {
        "tags": [
          "Company / Currency FX"
        ],
        "summary": "Switch Currency To Automatic",
        "description": "Returns the target currency to the automatic rate from today: the current window is ended yesterday (or retired if it started today) and upcoming windows are soft-deleted. Expired windows are preserved as history.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:currency, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "switch_automatic",
        "parameters": [
          {
            "name": "currency",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Currency switched to automatic",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyFxRateSwitchAutomaticResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:currency",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/currency-rates/{id}": {
      "put": {
        "tags": [
          "Company / Currency FX"
        ],
        "summary": "Edit Custom FX Rate",
        "description": "Edits the rate/window of a current or upcoming custom FX window. Expired or deleted windows are not editable. The start date of a window already in effect cannot change (`FX_RATE_START_LOCKED`).\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:currency, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_company_currency_rates_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyFxRateUpdateForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Custom FX window updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyFxRateModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:currency",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Company / Currency FX"
        ],
        "summary": "Remove Custom FX Rate",
        "description": "Removes a current or upcoming custom FX window, returning the pair to the automatic rate from today. A window that was in effect before today is ended yesterday (`outcome: ended`) so its history stays; an upcoming window, or one that started today, is soft-deleted (`outcome: deleted`). Repeating the call on a deleted window returns `outcome: already_deleted`. Expired windows cannot be removed.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:currency, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "delete_delete_company_currency_rates_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Custom FX window removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyFxRateDeleteResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:currency",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/currency/add": {
      "post": {
        "tags": [
          "Company / Currency"
        ],
        "summary": "Add Company Currencies",
        "description": "Appends one or more currencies to the company's profile without touching the ones already configured (their ids and any linked FX rates are preserved). Currencies already present are rejected with CURRENCY_ALREADY_ADDED; any validation failure rejects the entire request. Use DELETE to remove a currency.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:currency, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "add",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyCurrencyAddForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Currencies added successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyCurrencyListResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:currency",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/currency/{id}": {
      "delete": {
        "tags": [
          "Company / Currency"
        ],
        "summary": "Delete Company Currency",
        "description": "Removes a specific currency from the company's configuration.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:currency, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_delete_company_currency_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Currency deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyCurrencyDeleteResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:currency",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/delete/{id}": {
      "post": {
        "tags": [
          "Company"
        ],
        "summary": "Soft Delete Company",
        "description": "Performs a soft delete on the specified company after email or TOTP confirmation.\n\nHyperlane requires a bearer JWT. Required permissions (any): company:delete, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "soft_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthenticatedActionChallengeForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Company soft deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDeleteResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "company:delete",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/emails": {
      "get": {
        "tags": [
          "Company / Email Templates"
        ],
        "summary": "List Email Templates",
        "description": "Retrieves all email templates configured for the specified company.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:email-template, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_company_emails",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of email templates retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyEmailTemplateListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:email-template",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/emails/{doc_type_id}/{template_type}": {
      "get": {
        "tags": [
          "Company / Email Templates"
        ],
        "summary": "Get Email Template",
        "description": "Retrieves a specific email template by document type ID and template type for the specified company.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:email-template, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_get_company_emails_doc_type_id_template_type",
        "parameters": [
          {
            "name": "doc_type_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Email template retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyEmailTemplateDetailResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Email template not found"
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:email-template",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/emails/{id}": {
      "put": {
        "tags": [
          "Company / Email Templates"
        ],
        "summary": "Update Email Template",
        "description": "Updates an existing email template's subject and body content.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:email-template, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_company_emails_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyEmailTemplateFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Email template updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyEmailTemplateDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:email-template",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/list": {
      "get": {
        "tags": [
          "Company"
        ],
        "summary": "List Companies",
        "description": "Returns all companies associated with the authenticated user, including basic metadata such as name, email, and logo.\n\nHyperlane requires a bearer JWT. Required permissions (any): company:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "company_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of companies retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "company:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/logo-inline": {
      "post": {
        "tags": [
          "Company"
        ],
        "summary": "Save Logo Data URL",
        "description": "Saves a company logo from a base64-encoded data URL. Validates image type (JPEG, PNG, WEBP) and enforces a 200KB size limit.\n\nHyperlane requires a bearer JWT. Required permissions (any): company:add, company:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "save_logo_data_url",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyLogoDataUrlForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Logo saved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyLogoDataUrlResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "company:add",
            "company:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Company"
        ],
        "summary": "Delete Logo Data URL",
        "description": "Removes the company's inline logo data URL from the profile.\n\nHyperlane requires a bearer JWT. Required permissions (any): company:add, company:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_logo_data_url",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Logo deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyLogoDataUrlResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "company:add",
            "company:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/payment-gateways": {
      "get": {
        "tags": [
          "Company / Payment Gateways"
        ],
        "summary": "List Payment Gateways",
        "description": "Retrieves all payment gateways configured for the specified company.\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:view, app-setting:online-payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_company_payment_gateways",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of payment gateways retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentGatewayListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:view",
            "app-setting:online-payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Company / Payment Gateways"
        ],
        "summary": "Create Payment Gateway",
        "description": "Registers a new payment gateway with the specified credentials for the company.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:online-payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_company_payment_gateways",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyPaymentGatewayFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payment gateway created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentGatewayDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:online-payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/payment-gateways/{id}": {
      "put": {
        "tags": [
          "Company / Payment Gateways"
        ],
        "summary": "Update Payment Gateway",
        "description": "Modifies an existing payment gateway's credentials or enabled status.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:online-payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "update_put_company_payment_gateways_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyPaymentGatewayFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payment gateway updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentGatewayDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:online-payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Company / Payment Gateways"
        ],
        "summary": "Delete Payment Gateway",
        "description": "Removes a payment gateway from the company's configuration.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:online-payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_delete_company_payment_gateways_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment gateway deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentGatewayDeleteModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:online-payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/payment-modes": {
      "get": {
        "tags": [
          "Company / Payment Modes"
        ],
        "summary": "List Payment Modes",
        "description": "Retrieves a paginated list of payment modes configured for the specified company.\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:view, invoice:payment, app-setting:payment-mode, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_company_payment_modes",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of payment modes retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentModeListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:view",
            "invoice:payment",
            "app-setting:payment-mode",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Company / Payment Modes"
        ],
        "summary": "Create Payment Mode",
        "description": "Creates a new payment mode for the specified company.\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:view, invoice:payment, app-setting:payment-mode, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_company_payment_modes",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyPaymentModeFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payment mode created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentModeDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:view",
            "invoice:payment",
            "app-setting:payment-mode",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/payment-modes/{id}": {
      "put": {
        "tags": [
          "Company / Payment Modes"
        ],
        "summary": "Update Payment Mode",
        "description": "Updates an existing payment mode's label or configuration.\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:view, invoice:payment, app-setting:payment-mode, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_company_payment_modes_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyPaymentModeFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payment mode updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentModeDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:view",
            "invoice:payment",
            "app-setting:payment-mode",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Company / Payment Modes"
        ],
        "summary": "Delete Payment Mode",
        "description": "Removes a payment mode from the company's configuration.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:payment-mode, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_delete_company_payment_modes_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment mode deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentModeDetailResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:payment-mode",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/payment-terms": {
      "get": {
        "tags": [
          "Company / Payment Terms"
        ],
        "summary": "List Payment Terms",
        "description": "Retrieves a paginated list of payment terms configured for the specified company.\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:view, app-setting:payment-term, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_company_payment_terms",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of payment terms retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentTermListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:view",
            "app-setting:payment-term",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Company / Payment Terms"
        ],
        "summary": "Create Payment Term",
        "description": "Creates a new payment term with a label and number of days value for the specified company.\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:view, app-setting:payment-term, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_company_payment_terms",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyPaymentTermFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payment term created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentTermDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:view",
            "app-setting:payment-term",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/payment-terms/{id}": {
      "put": {
        "tags": [
          "Company / Payment Terms"
        ],
        "summary": "Update Payment Term",
        "description": "Updates an existing payment term's label or value.\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:view, app-setting:payment-term, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_company_payment_terms_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyPaymentTermFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payment term updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentTermDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:view",
            "app-setting:payment-term",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Company / Payment Terms"
        ],
        "summary": "Delete Payment Term",
        "description": "Removes a payment term from the company's configuration.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:payment-term, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_delete_company_payment_terms_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment term deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyPaymentTermDetailResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:payment-term",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/smtp": {
      "get": {
        "tags": [
          "Company / Email Delivery"
        ],
        "summary": "Get SMTP Configuration",
        "description": "Retrieves the SMTP configuration for the specified company, including server, port, and security settings.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:smtp, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_get_company_smtp",
        "parameters": [],
        "responses": {
          "200": {
            "description": "SMTP configuration retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmtpPublicDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "SMTP configuration not found"
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:smtp",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Company / Email Delivery"
        ],
        "summary": "Update SMTP Configuration",
        "description": "Updates the existing SMTP configuration. Validates connection settings before persisting changes.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:smtp, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_company_smtp",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmtpFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "SMTP configuration updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmtpPublicFormResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:smtp",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Company / Email Delivery"
        ],
        "summary": "Create SMTP Configuration",
        "description": "Creates a new SMTP configuration for the company. Validates connection settings including server, port, and security method before saving.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:smtp, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_company_smtp",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmtpFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "SMTP configuration created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmtpPublicFormResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:smtp",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Company / Email Delivery"
        ],
        "summary": "Delete SMTP Configuration",
        "description": "Removes the SMTP configuration for the specified company.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:smtp, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_delete_company_smtp",
        "parameters": [],
        "responses": {
          "200": {
            "description": "SMTP configuration deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmtpDeleteResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:smtp",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/stripe-connect": {
      "get": {
        "tags": [
          "Company / Stripe Connect"
        ],
        "summary": "List Stripe Connect Accounts",
        "description": "Retrieves all Stripe Connect accounts associated with the specified company, regardless of connection status.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:online-payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_company_stripe_connect",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Connected accounts listed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StripeConnectRawListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:online-payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Company / Stripe Connect"
        ],
        "summary": "Connect Stripe Account",
        "description": "Initiates a new Stripe Connect account connection for the company. Creates the account and begins the onboarding flow.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:online-payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "connect",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyStripConnectFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Stripe account connection initiated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StripeConnectUrlResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:online-payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/stripe-connect/accounts/ready": {
      "get": {
        "tags": [
          "Company / Stripe Connect"
        ],
        "summary": "Get Fully Connected Accounts",
        "description": "Retrieves all Stripe Connect accounts that have completed the onboarding process and are fully operational for the specified company.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:online-payment, invoice:add, invoice:edit, invoice:list, invoice:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_fully_connected_accounts",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Fully connected accounts retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StripeConnectListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:online-payment",
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/stripe-connect/resume-onboarding/{id}": {
      "get": {
        "tags": [
          "Company / Stripe Connect"
        ],
        "summary": "Resume Stripe Onboarding",
        "description": "Generates a new onboarding link for a Stripe Connect account that has not completed the onboarding process.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:online-payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "resume_onboading",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Onboarding link generated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StripeConnectUrlResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:online-payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/stripe-connect/{id}": {
      "delete": {
        "tags": [
          "Company / Stripe Connect"
        ],
        "summary": "Delete Stripe Connect Account",
        "description": "Removes a Stripe Connect account from the company's configuration.\n\nHyperlane requires a bearer JWT. Required permissions (any): app-setting:online-payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_delete_company_stripe_connect_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stripe account deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteStripeConnectAccountResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "app-setting:online-payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/company/mark-onboarding-completed": {
      "put": {
        "tags": [
          "Company"
        ],
        "summary": "Mark Onboarding Completed",
        "description": "Marks the onboarding process as completed for the specified company, enabling full platform features.\n\nHyperlane requires a bearer JWT. Required permissions (any): company:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "update_onboarding_flag",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Onboarding flag updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyUpdateResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "company:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes": {
      "get": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "List Credit Note",
        "description": "List {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:list, credit-note:view, credit-note:view, credit-note:payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_credit_notes",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "client",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "issue_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of documents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_DocumentListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "credit-note:view",
            "credit-note:payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Create Credit Note",
        "description": "Create {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_credit_notes",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Create a new document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/setting/status": {
      "get": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Get All Status",
        "description": "Get All Status\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_all_status_get_credit_notes_setting_status",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get All Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Add New Status",
        "description": "Add New Status\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "document_status_post_credit_notes_setting_status",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add New Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/attribute": {
      "put": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Bulk Update Attributes",
        "description": "Bulk Update Attributes\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "attr_update_put_credit_notes_attribute",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentAttrFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Bulk update attributes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentAttrFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/setting": {
      "get": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Get Settings",
        "description": "Get Settings\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_document_setting_get_credit_notes_setting",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSettingModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Save Settings",
        "description": "Save Settings\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "save_document_setting_put_credit_notes_setting",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Save Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSettingModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/setting/state-transition": {
      "get": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Get Transitions",
        "description": "Get Transitions\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_state_transition_get_credit_notes_setting_state_transition",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get Transitions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_TransitionListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/setting/state-transition/ledger-effects": {
      "get": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "List ledger effects for a document type",
        "description": "Returns the LedgerEffect enum variants available for this document type. Workflow forms should load the dropdown from this list rather than hardcoding values.\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "get_ledger_effect_options_get_credit_notes_setting_state_transition_ledger_effects",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Available ledger effects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_LedgerEffectOption"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/setting/status/{id}": {
      "put": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Update Status",
        "description": "Update Status\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_document_status_put_credit_notes_setting_status_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Delete Status",
        "description": "Delete Status\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_status_delete_credit_notes_setting_status_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/{id}": {
      "get": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Get Credit Note",
        "description": "Get {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_document_by_anchor_get_credit_notes_id",
        "parameters": [
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get document detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_Vec_DocumentDetailModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Update Credit Note",
        "description": "Update {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_credit_notes_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update the document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/{id}/comment": {
      "get": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "List comment",
        "description": "List comment\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_comment_get_credit_notes_id_comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_DocumentCommentModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Add comment",
        "description": "Add comment\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "add_comment_post_credit_notes_id_comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentCommentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_DocumentCommentModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/{id}/comment/{comment_id}": {
      "delete": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Delete comment",
        "description": "Delete comment\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_comment_delete_credit_notes_id_comment_comment_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_DocumentCommentDeleteModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/{id}/dimensions": {
      "put": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Correct Credit Note line dimensions",
        "description": "Changes the dimension values of an issued document's lines and nothing else (amounts, accounts, taxes and dates cannot be sent). Each listed line gets exactly the values sent (an empty list clears it); lines not listed keep theirs. The document's current version is updated in place and its journal re-posted with the new resolved values. Send expected_version (the current version_number). Transaction Locking applies as for an edit: a hard lock refuses the call, a soft lock lets a user with the bypass permission through and is logged.\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "correct_dimensions_put_credit_notes_id_dimensions",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DimensionCorrectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Corrected",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionCorrectionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or lock error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Document not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Version conflict, unknown line, or document not issued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/{id}/mail/send": {
      "post": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Send via Email",
        "description": "Send via Email\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:send, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "send_mail_post_credit_notes_id_mail_send",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentMailFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Send Email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentMailFromResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:send",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/{id}/mail/{template_id}": {
      "get": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Get Mail Content",
        "description": "Get Mail Content\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_email_template_get_credit_notes_id_mail_template_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get Mail Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailTemplateTypeModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/{id}/meta-data": {
      "post": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Update meta data",
        "description": "Update meta data\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "meta_data_post_credit_notes_id_meta_data",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentMetaData"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update meta data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/credit-notes/{id}/state-transition": {
      "put": {
        "tags": [
          "Credit Notes"
        ],
        "summary": "Status Transition",
        "description": "Status Transition\n\nHyperlane requires a bearer JWT. Required permissions (any): credit-note:add, credit-note:edit, credit-note:list, credit-note:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "transition_to_put_credit_notes_id_state_transition",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransitionFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Status Transition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/data-exports": {
      "get": {
        "tags": [
          "Data Export"
        ],
        "summary": "list",
        "description": "list\n\nHyperlane requires a bearer JWT. Allowed JWT audiences: web_app. Required permissions (any): app-setting:data-export, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "list_get_data_exports",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataExportListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "audience": [
            "web_app"
          ],
          "scopes": [
            "app-setting:data-export",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Data Export"
        ],
        "summary": "create",
        "description": "create\n\nHyperlane requires a bearer JWT. Allowed JWT audiences: web_app. Required permissions (any): app-setting:data-export, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_data_exports",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataExportCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataExportResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "audience": [
            "web_app"
          ],
          "scopes": [
            "app-setting:data-export",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/data-exports/{export_id}": {
      "get": {
        "tags": [
          "Data Export"
        ],
        "summary": "detail",
        "description": "detail\n\nHyperlane requires a bearer JWT. Allowed JWT audiences: web_app. Required permissions (any): app-setting:data-export, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "detail_get_data_exports_export_id",
        "parameters": [
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataExportResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "audience": [
            "web_app"
          ],
          "scopes": [
            "app-setting:data-export",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/data-exports/{export_id}/download": {
      "post": {
        "tags": [
          "Data Export"
        ],
        "summary": "download",
        "description": "download\n\nHyperlane requires a bearer JWT. Allowed JWT audiences: web_app. Required permissions (any): app-setting:data-export, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "download",
        "parameters": [
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataExportDownloadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "audience": [
            "web_app"
          ],
          "scopes": [
            "app-setting:data-export",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/expenses": {
      "get": {
        "tags": [
          "Expenses"
        ],
        "summary": "List Expense",
        "description": "List Expense\n\nHyperlane requires a bearer JWT. Required permissions (any): expense:add, expense:edit, expense:list, expense:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_expenses",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "client",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "is_billable",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "recurring",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "vendor",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "tab",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "include_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List Expense",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "expense:add",
            "expense:edit",
            "expense:list",
            "expense:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Expenses"
        ],
        "summary": "Create Expense",
        "description": "Create Expense\n\nHyperlane requires a bearer JWT. Required permissions (any): expense:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_expenses",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpenseFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Create Expense",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "expense:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Expenses"
        ],
        "summary": "Delete Expense",
        "description": "Delete Expense\n\nHyperlane requires a bearer JWT. Required permissions (any): expense:delete, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_delete_expenses",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpenseDeleteFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Delete Expense",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseDeleteResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "expense:delete",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/expenses/{id}": {
      "get": {
        "tags": [
          "Expenses"
        ],
        "summary": "Get Expense",
        "description": "Get Expense\n\nHyperlane requires a bearer JWT. Required permissions (any): expense:add, expense:edit, expense:list, expense:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "detail_get_expenses_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get Expense",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseDetailResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "expense:add",
            "expense:edit",
            "expense:list",
            "expense:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Expenses"
        ],
        "summary": "Update Expense",
        "description": "Update Expense\n\nHyperlane requires a bearer JWT. Required permissions (any): expense:add, expense:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_expenses_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpenseFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update Expense",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpenseDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "expense:add",
            "expense:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/expenses/{id}/dimensions": {
      "put": {
        "tags": [
          "Expenses"
        ],
        "summary": "Correct Expense line dimensions",
        "description": "Changes the dimension values of an approved expense's lines and nothing else (amounts, accounts, taxes and dates cannot be sent). Each listed line gets exactly the values sent (an empty list clears it); lines not listed keep theirs. The expense's journal is re-posted with the new resolved values. Send expected_updated_at (the expense's updated_at as listed, null when never updated). Transaction Locking applies as for an edit: a hard lock refuses the call, a soft lock lets a user with the bypass permission through and is logged.\n\nHyperlane requires a bearer JWT. Required permissions (any): expense:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "correct_dimensions_put_expenses_id_dimensions",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DimensionCorrectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Corrected",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionCorrectionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or lock error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Expense not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Version conflict, unknown line, or expense not approved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "expense:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "List Invoice",
        "description": "List {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_invoices",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "client",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "issue_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "recurring",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of documents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_DocumentListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Create Invoice",
        "description": "Create {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_invoices",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Create a new document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/setting/status": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Get All Status",
        "description": "Get All Status\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:view, invoice:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_all_status_get_invoices_setting_status",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get All Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:view",
            "invoice:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Add New Status",
        "description": "Add New Status\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "document_status_post_invoices_setting_status",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add New Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/attribute": {
      "put": {
        "tags": [
          "Invoices"
        ],
        "summary": "Bulk Update Attributes",
        "description": "Bulk Update Attributes\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "attr_update_put_invoices_attribute",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentAttrFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Bulk update attributes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentAttrFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/payments/bulk": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Record full payments for selected Invoice documents",
        "description": "Record full payments for selected {{document_type}} documents\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "bulk_full_payment",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkFullPaymentFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Record bulk payments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkFullPaymentResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/setting": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Get Settings",
        "description": "Get Settings\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:list, invoice:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_document_setting_get_invoices_setting",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSettingModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Invoices"
        ],
        "summary": "Save Settings",
        "description": "Save Settings\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:list, invoice:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "save_document_setting_put_invoices_setting",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Save Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSettingModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/setting/state-transition": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Get Transitions",
        "description": "Get Transitions\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:list, invoice:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_state_transition_get_invoices_setting_state_transition",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get Transitions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_TransitionListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/setting/state-transition/ledger-effects": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "List ledger effects for a document type",
        "description": "Returns the LedgerEffect enum variants available for this document type. Workflow forms should load the dropdown from this list rather than hardcoding values.\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:list, invoice:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "get_ledger_effect_options_get_invoices_setting_state_transition_ledger_effects",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Available ledger effects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_LedgerEffectOption"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/setting/status/{id}": {
      "put": {
        "tags": [
          "Invoices"
        ],
        "summary": "Update Status",
        "description": "Update Status\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_document_status_put_invoices_setting_status_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Invoices"
        ],
        "summary": "Delete Status",
        "description": "Delete Status\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_status_delete_invoices_setting_status_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/state-transition/bulk": {
      "put": {
        "tags": [
          "Invoices"
        ],
        "summary": "Bulk transition documents",
        "description": "Bulk transition documents\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "bulk_transition_to",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkTransitionFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Bulk transition documents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkTransitionResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/{id}": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Get Invoice",
        "description": "Get {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:list, invoice:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_document_by_anchor_get_invoices_id",
        "parameters": [
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get document detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_Vec_DocumentDetailModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Invoices"
        ],
        "summary": "Update Invoice",
        "description": "Update {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_invoices_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update the document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/{id}/comment": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "List comment",
        "description": "List comment\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_comment_get_invoices_id_comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_DocumentCommentModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Add comment",
        "description": "Add comment\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "add_comment_post_invoices_id_comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentCommentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_DocumentCommentModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/{id}/comment/{comment_id}": {
      "delete": {
        "tags": [
          "Invoices"
        ],
        "summary": "Delete comment",
        "description": "Delete comment\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_comment_delete_invoices_id_comment_comment_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_DocumentCommentDeleteModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/{id}/credits": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Apply credit",
        "description": "Apply credit\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "apply_credit",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyCreditFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Apply credit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplyCreditFromResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/{id}/dimensions": {
      "put": {
        "tags": [
          "Invoices"
        ],
        "summary": "Correct Invoice line dimensions",
        "description": "Changes the dimension values of an issued document's lines and nothing else (amounts, accounts, taxes and dates cannot be sent). Each listed line gets exactly the values sent (an empty list clears it); lines not listed keep theirs. The document's current version is updated in place and its journal re-posted with the new resolved values. Send expected_version (the current version_number). Transaction Locking applies as for an edit: a hard lock refuses the call, a soft lock lets a user with the bypass permission through and is logged.\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "correct_dimensions_put_invoices_id_dimensions",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DimensionCorrectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Corrected",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DimensionCorrectionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or lock error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "Document not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "409": {
            "description": "Version conflict, unknown line, or document not issued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dimensions not activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/{id}/mail/send": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Send via Email",
        "description": "Send via Email\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:send, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "send_mail_post_invoices_id_mail_send",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentMailFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Send Email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentMailFromResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:send",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/{id}/mail/{template_id}": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Get Mail Content",
        "description": "Get Mail Content\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:send, invoice:edit, invoice:list, invoice:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_email_template_get_invoices_id_mail_template_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get Mail Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailTemplateTypeModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:send",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/{id}/meta-data": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Update meta data",
        "description": "Update meta data\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "meta_data_post_invoices_id_meta_data",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentMetaData"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update meta data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/{id}/payment": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Add Invoice Payment",
        "description": "Payment and required settlement/FX effects commit together. Optional Idempotency-Key (1–128 characters) is company-scoped: identical retries return the recorded payment, including its reversal state; changed details return 409. Without a key each request is a new payment. References remain free-form.\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "save_payment_post_invoices_id_payment",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Stable client request identity; reuse only for identical retries",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add payment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentFromResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/{id}/payment/{payment_id}": {
      "delete": {
        "tags": [
          "Invoices"
        ],
        "summary": "Delete Invoice Payment",
        "description": "Delete {{document_type}} Payment\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:payment, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_payment_delete_invoices_id_payment_payment_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete payment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentFromResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:payment",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/invoices/{id}/state-transition": {
      "put": {
        "tags": [
          "Invoices"
        ],
        "summary": "Status Transition",
        "description": "Status Transition\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "transition_to_put_invoices_id_state_transition",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransitionFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Status Transition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/items": {
      "get": {
        "tags": [
          "Items"
        ],
        "summary": "List Item",
        "description": "List Item\n\nHyperlane requires a bearer JWT. Required permissions (any): item:add, item:edit, item:list, invoice:add, invoice:edit, invoice:list, estimate:add, estimate:edit, estimate:list, credit-note:add, credit-note:edit, credit-note:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_items",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "sku",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "item_unit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "item_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "deleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "item:add",
            "item:edit",
            "item:list",
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "estimate:add",
            "estimate:edit",
            "estimate:list",
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Items"
        ],
        "summary": "Add Item",
        "description": "Add Item\n\nHyperlane requires a bearer JWT. Required permissions (any): item:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_items",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add Item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "item:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/items/dimension-defaults/lookup": {
      "post": {
        "tags": [
          "Items"
        ],
        "summary": "Look up item default dimensions",
        "description": "Batch read of the default dimension values saved on up to 100 items, so a screen that needs many items' defaults (Dimension Assignment) makes one call instead of reading each item's detail. A read sent as POST because the ids do not fit a query string. One entry per requested id, in request order; an item with none (or an id that is not this tenant's item) has an empty state. The items list is empty while Dimensions is not activated, like the item detail.\n\nHyperlane requires a bearer JWT. Required permissions (any): item:add, item:edit, item:list, item:view, invoice:add, invoice:edit, invoice:list, estimate:add, estimate:edit, estimate:list, credit-note:add, credit-note:edit, credit-note:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "dimension_defaults_lookup_post_items_dimension_defaults_lookup",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefaultsLookupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Defaults per item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DefaultsLookupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Empty list, more than 100 ids, or a blank id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "item:add",
            "item:edit",
            "item:list",
            "item:view",
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "estimate:add",
            "estimate:edit",
            "estimate:list",
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/items/{id}": {
      "get": {
        "tags": [
          "Items"
        ],
        "summary": "Get Item",
        "description": "Get Item\n\nHyperlane requires a bearer JWT. Required permissions (any): item:add, item:edit, item:list, item:view, invoice:add, invoice:edit, invoice:list, estimate:add, estimate:edit, estimate:list, credit-note:add, credit-note:edit, credit-note:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "detail_get_items_id",
        "parameters": [
          {
            "name": "people_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "people_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "document_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "fx_rate",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "unit_price",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "document_item_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "banking_account_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "fx_date",
            "in": "query",
            "description": "Document date (`YYYY-MM-DD`, company-local) used to pick a company custom\nFX window when an item's default price must be converted. Defaults to today.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Item detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_ItemModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "item:add",
            "item:edit",
            "item:list",
            "item:view",
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "estimate:add",
            "estimate:edit",
            "estimate:list",
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Items"
        ],
        "summary": "Update Item",
        "description": "Update Item\n\nHyperlane requires a bearer JWT. Required permissions (any): item:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_items_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update Item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "item:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Items"
        ],
        "summary": "Delete Item",
        "description": "Delete Item\n\nHyperlane requires a bearer JWT. Required permissions (any): item:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "delete_delete_items_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete Item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ItemModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "item:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/late-fee": {
      "get": {
        "tags": [
          "Late Fees"
        ],
        "summary": "List Late Fees",
        "description": "Returns the paginated late fee rules configured for the specified company.\n\nHyperlane requires a bearer JWT. Required permissions (any): late-fee:add, late-fee:edit, late-fee:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_doc_get_late_fee",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Late fee list retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LateFeeListResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Request failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "late-fee:add",
            "late-fee:edit",
            "late-fee:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Late Fees"
        ],
        "summary": "Create Late Fee",
        "description": "Creates a new late fee rule for the specified company.\n\nHyperlane requires a bearer JWT. Required permissions (any): late-fee:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_doc_post_late_fee",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LateFeeFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Late fee created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LateFeeFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "late-fee:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/late-fee/get-all": {
      "get": {
        "tags": [
          "Late Fees"
        ],
        "summary": "Get All Late Fees",
        "description": "Returns all late fee rules for the specified company without pagination.\n\nHyperlane requires a bearer JWT. Required permissions (any): late-fee:add, late-fee:edit, late-fee:list, invoice:add, invoice:edit, invoice:list, invoice:view, estimate:add, estimate:edit, estimate:list, credit-note:add, credit-note:edit, credit-note:list, client:add, client:edit, client:list, client:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_all_late_fees_doc",
        "parameters": [],
        "responses": {
          "200": {
            "description": "All late fees retrieved",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Request failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "late-fee:add",
            "late-fee:edit",
            "late-fee:list",
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "estimate:add",
            "estimate:edit",
            "estimate:list",
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "client:add",
            "client:edit",
            "client:list",
            "client:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/late-fee/{id}": {
      "get": {
        "tags": [
          "Late Fees"
        ],
        "summary": "Get Late Fee",
        "description": "Retrieves a single late fee rule by its identifier.\n\nHyperlane requires a bearer JWT. Required permissions (any): late-fee:add, late-fee:edit, late-fee:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "detail_doc_get_late_fee_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Late fee id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Late fee detail retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LateFeeDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Request failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "late-fee:add",
            "late-fee:edit",
            "late-fee:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Late Fees"
        ],
        "summary": "Update Late Fee",
        "description": "Updates an existing late fee rule by its identifier.\n\nHyperlane requires a bearer JWT. Required permissions (any): late-fee:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_doc_put_late_fee_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Late fee id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LateFeeFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Late fee updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LateFeeFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "late-fee:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/partner/companies": {
      "post": {
        "tags": [
          "Partner"
        ],
        "summary": "Provision companies",
        "description": "Creates up to 100 companies with their owner user through the signup path (no captcha, verification, terms, password, welcome mail, or trial). Idempotent on the partner's external ids: same payload returns the existing rows, a different payload returns 409 for that item. Per-item outcomes.\n\nHyperlane requires a bearer JWT. Allowed JWT audiences: partner.",
        "operationId": "provision_companies",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProvisionCompaniesForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Per-item results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvisionCompaniesResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Partner token required"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "audience": [
            "partner"
          ]
        }
      }
    },
    "/v1/partner/companies/{company_id}/resume": {
      "post": {
        "tags": [
          "Partner"
        ],
        "summary": "Resume a suspended partner company",
        "description": "Resume a suspended partner company\n\nHyperlane requires a bearer JWT. Allowed JWT audiences: partner.",
        "operationId": "resume_company",
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Active",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerActionResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Company not owned by this partner"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "audience": [
            "partner"
          ]
        }
      }
    },
    "/v1/partner/companies/{company_id}/sessions": {
      "post": {
        "tags": [
          "Partner"
        ],
        "summary": "Mint user sessions on a partner company",
        "description": "Issues short-lived App Connect access tokens for one or more partner-managed users of a company the partner owns. Ownership (company, user, membership all under the partner) is re-checked on every call; permissions are the user's current role capped by the licence ceiling; a company without a subscription or under a read-only licence receives read-only tokens. Per-user outcomes.\n\nHyperlane requires a bearer JWT. Allowed JWT audiences: partner.",
        "operationId": "mint_sessions",
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerSessionForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Per-user results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerSessionsResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Partner token or credential invalid"
          },
          "403": {
            "description": "Partner suspended"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "audience": [
            "partner"
          ]
        }
      }
    },
    "/v1/partner/companies/{company_id}/suspend": {
      "post": {
        "tags": [
          "Partner"
        ],
        "summary": "Suspend a partner company",
        "description": "Suspend a partner company\n\nHyperlane requires a bearer JWT. Allowed JWT audiences: partner.",
        "operationId": "suspend_company",
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Suspended",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerActionResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Company not owned by this partner"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "audience": [
            "partner"
          ]
        }
      }
    },
    "/v1/partner/companies/{company_id}/users": {
      "post": {
        "tags": [
          "Partner"
        ],
        "summary": "Add a user to a partner company",
        "description": "Adds a partner-managed user with a role from the company's own role list. Portal roles (client, vendor) are refused. Reuses an existing user by external id (one user, many companies).\n\nHyperlane requires a bearer JWT. Allowed JWT audiences: partner.",
        "operationId": "add_user",
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "description": "Company id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUserCreateForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "User attached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerUserResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid role"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Company not owned by this partner"
          },
          "409": {
            "description": "Email already exists or limit reached"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "audience": [
            "partner"
          ]
        }
      }
    },
    "/v1/partner/token": {
      "post": {
        "tags": [
          "Partner"
        ],
        "summary": "Partner token (client credentials)",
        "description": "Issues an `aud=partner` token for a partner credential. Accepted only on `/partner/*` routes. `client_secret_ip` credentials must present the secret from an allow-listed source IP.",
        "operationId": "token",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerTokenForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Token issued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerTokenResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid client credentials"
          },
          "403": {
            "description": "Partner suspended"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [],
        "x-hyperlane-auth": {
          "bearer": false
        }
      }
    },
    "/v1/partner/users/{user_id}/deactivate": {
      "post": {
        "tags": [
          "Partner"
        ],
        "summary": "Deactivate a partner-managed user",
        "description": "Deactivates every membership, revokes the user's partner sessions, and marks the user inactive. Live tokens expire at their TTL.\n\nHyperlane requires a bearer JWT. Allowed JWT audiences: partner.",
        "operationId": "deactivate_user",
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "User id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Deactivated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerActionResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "User not owned by this partner"
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "audience": [
            "partner"
          ]
        }
      }
    },
    "/v1/projects": {
      "get": {
        "tags": [
          "Projects & Timesheets"
        ],
        "summary": "List Projects",
        "description": "Returns the paginated projects visible to the authenticated company.\n\nHyperlane requires a bearer JWT. Required permissions (any): project:add, project:edit, project:list, project:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_doc_get_projects",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Project list retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectListResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Request failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "project:add",
            "project:edit",
            "project:list",
            "project:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Projects & Timesheets"
        ],
        "summary": "Create Project",
        "description": "Creates a new project for the authenticated company.\n\nHyperlane requires a bearer JWT. Required permissions (any): project:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_doc_post_projects",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Project created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "project:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/projects/tasks": {
      "get": {
        "tags": [
          "Projects & Timesheets"
        ],
        "summary": "List Project Tasks",
        "description": "Returns the paginated project task catalog for the authenticated company.\n\nHyperlane requires a bearer JWT. Required permissions (any): project:add, project:edit, project:list, project:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_doc_get_projects_tasks",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Task list retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskListResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Request failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "project:add",
            "project:edit",
            "project:list",
            "project:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Projects & Timesheets"
        ],
        "summary": "Create Project Task",
        "description": "Creates a reusable project task for the authenticated company.\n\nHyperlane requires a bearer JWT. Required permissions (any): project:add, project:edit, project:view, project:list, project:task-add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_doc_post_projects_tasks",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Task created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "project:add",
            "project:edit",
            "project:view",
            "project:list",
            "project:task-add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/projects/tasks/{id}": {
      "put": {
        "tags": [
          "Projects & Timesheets"
        ],
        "summary": "Update Project Task",
        "description": "Updates an existing project task for the authenticated company.\n\nHyperlane requires a bearer JWT. Required permissions (any): project:add, project:edit, project:view, project:list, project:task-add, project:task-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_doc_put_projects_tasks_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Task id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Task updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "project:add",
            "project:edit",
            "project:view",
            "project:list",
            "project:task-add",
            "project:task-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/projects/timesheet-for-invoice": {
      "get": {
        "tags": [
          "Projects & Timesheets"
        ],
        "summary": "List Invoice Timesheets",
        "description": "Returns grouped unbilled timesheet data for building a project invoice.\n\nHyperlane requires a bearer JWT. Required permissions (any): project:add, project:edit, project:list, project:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "timesheet_invoice_list_doc",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Invoice-ready timesheets retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetInvoiceResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Request failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "project:add",
            "project:edit",
            "project:list",
            "project:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/projects/timesheets": {
      "get": {
        "tags": [
          "Projects & Timesheets"
        ],
        "summary": "List Timesheets",
        "description": "Returns the paginated project timesheets visible to the authenticated company.\n\nHyperlane requires a bearer JWT. Required permissions (any): project:add, project:edit, project:list, project:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "timesheet_list_doc",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Timesheet list retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetListResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Request failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "project:add",
            "project:edit",
            "project:list",
            "project:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Projects & Timesheets"
        ],
        "summary": "Create Time Entry",
        "description": "Creates a project time entry for the authenticated company.\n\nHyperlane requires a bearer JWT. Required permissions (any): project:add, project:edit, project:view, project:list, project:timesheet-add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_time_entry_doc",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimesheetFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Time entry created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimesheetFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "project:add",
            "project:edit",
            "project:view",
            "project:list",
            "project:timesheet-add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/projects/{id}": {
      "get": {
        "tags": [
          "Projects & Timesheets"
        ],
        "summary": "Get Project",
        "description": "Retrieves a single project with task, staff, and attachment details.\n\nHyperlane requires a bearer JWT. Required permissions (any): project:add, project:edit, project:list, project:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "detail_doc_get_projects_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Project detail retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetailResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Request failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "project:add",
            "project:edit",
            "project:list",
            "project:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Projects & Timesheets"
        ],
        "summary": "Update Project",
        "description": "Updates an existing project for the authenticated company.\n\nHyperlane requires a bearer JWT. Required permissions (any): project:add, project:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_doc_put_projects_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Project id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Project updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "project:add",
            "project:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders": {
      "get": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "List Purchase Order",
        "description": "List {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, purchase-order:list, purchase-order:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_purchase_orders",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "vendor",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "issue_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "recurring",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of documents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_DocumentListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "purchase-order:list",
            "purchase-order:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Create Purchase Order",
        "description": "Create {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_purchase_orders",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Create a new document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/setting/status": {
      "get": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Get All Status",
        "description": "Get All Status\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, purchase-order:view, purchase-order:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_all_status_get_purchase_orders_setting_status",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get All Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "purchase-order:view",
            "purchase-order:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Add New Status",
        "description": "Add New Status\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "document_status_post_purchase_orders_setting_status",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add New Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/attribute": {
      "put": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Bulk Update Attributes",
        "description": "Bulk Update Attributes\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "attr_update_put_purchase_orders_attribute",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentAttrFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Bulk update attributes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentAttrFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/setting": {
      "get": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Get Settings",
        "description": "Get Settings\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, purchase-order:list, purchase-order:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_document_setting_get_purchase_orders_setting",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSettingModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "purchase-order:list",
            "purchase-order:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Save Settings",
        "description": "Save Settings\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, purchase-order:list, purchase-order:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "save_document_setting_put_purchase_orders_setting",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Save Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSettingModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "purchase-order:list",
            "purchase-order:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/setting/state-transition": {
      "get": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Get Transitions",
        "description": "Get Transitions\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, purchase-order:list, purchase-order:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_state_transition_get_purchase_orders_setting_state_transition",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get Transitions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_TransitionListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "purchase-order:list",
            "purchase-order:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/setting/state-transition/ledger-effects": {
      "get": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "List ledger effects for a document type",
        "description": "Returns the LedgerEffect enum variants available for this document type. Workflow forms should load the dropdown from this list rather than hardcoding values.\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, purchase-order:list, purchase-order:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "get_ledger_effect_options_get_purchase_orders_setting_state_transition_ledger_effects",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Available ledger effects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_LedgerEffectOption"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "purchase-order:list",
            "purchase-order:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/setting/status/{id}": {
      "put": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Update Status",
        "description": "Update Status\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_document_status_put_purchase_orders_setting_status_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Delete Status",
        "description": "Delete Status\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_status_delete_purchase_orders_setting_status_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/{id}": {
      "get": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Get Purchase Order",
        "description": "Get {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, purchase-order:list, purchase-order:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_document_by_anchor_get_purchase_orders_id",
        "parameters": [
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get document detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_Vec_DocumentDetailModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "purchase-order:list",
            "purchase-order:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Update Purchase Order",
        "description": "Update {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_purchase_orders_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update the document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/{id}/comment": {
      "get": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "List comment",
        "description": "List comment\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, purchase-order:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_comment_get_purchase_orders_id_comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_DocumentCommentModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "purchase-order:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Add comment",
        "description": "Add comment\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, purchase-order:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "add_comment_post_purchase_orders_id_comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentCommentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_DocumentCommentModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "purchase-order:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/{id}/comment/{comment_id}": {
      "delete": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Delete comment",
        "description": "Delete comment\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_comment_delete_purchase_orders_id_comment_comment_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_DocumentCommentDeleteModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/{id}/mail/send": {
      "post": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Send via Email",
        "description": "Send via Email\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:send, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "send_mail_post_purchase_orders_id_mail_send",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentMailFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Send Email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentMailFromResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:send",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/{id}/mail/{template_id}": {
      "get": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Get Mail Content",
        "description": "Get Mail Content\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:send, purchase-order:edit, purchase-order:list, purchase-order:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_email_template_get_purchase_orders_id_mail_template_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get Mail Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailTemplateTypeModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:send",
            "purchase-order:edit",
            "purchase-order:list",
            "purchase-order:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/{id}/meta-data": {
      "post": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Update meta data",
        "description": "Update meta data\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "meta_data_post_purchase_orders_id_meta_data",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentMetaData"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update meta data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/purchase-orders/{id}/state-transition": {
      "put": {
        "tags": [
          "Purchase Orders"
        ],
        "summary": "Status Transition",
        "description": "Status Transition\n\nHyperlane requires a bearer JWT. Required permissions (any): purchase-order:add, purchase-order:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "transition_to_put_purchase_orders_id_state_transition",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransitionFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Status Transition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "purchase-order:add",
            "purchase-order:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes": {
      "get": {
        "tags": [
          "Quotes"
        ],
        "summary": "List Quote",
        "description": "List {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:list, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_quotes",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "client",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "issue_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of documents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_DocumentListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Quotes"
        ],
        "summary": "Create Quote",
        "description": "Create {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_quotes",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Create a new document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/setting/status": {
      "get": {
        "tags": [
          "Quotes"
        ],
        "summary": "Get All Status",
        "description": "Get All Status\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:list, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_all_status_get_quotes_setting_status",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get All Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Quotes"
        ],
        "summary": "Add New Status",
        "description": "Add New Status\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:list, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "document_status_post_quotes_setting_status",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add New Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/attribute": {
      "put": {
        "tags": [
          "Quotes"
        ],
        "summary": "Bulk Update Attributes",
        "description": "Bulk Update Attributes\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "attr_update_put_quotes_attribute",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentAttrFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Bulk update attributes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentAttrFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/setting": {
      "get": {
        "tags": [
          "Quotes"
        ],
        "summary": "Get Settings",
        "description": "Get Settings\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:list, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_document_setting_get_quotes_setting",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSettingModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Quotes"
        ],
        "summary": "Save Settings",
        "description": "Save Settings\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:list, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "save_document_setting_put_quotes_setting",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Save Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSettingModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/setting/state-transition": {
      "get": {
        "tags": [
          "Quotes"
        ],
        "summary": "Get Transitions",
        "description": "Get Transitions\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:list, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_state_transition_get_quotes_setting_state_transition",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get Transitions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_TransitionListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/setting/state-transition/ledger-effects": {
      "get": {
        "tags": [
          "Quotes"
        ],
        "summary": "List ledger effects for a document type",
        "description": "Returns the LedgerEffect enum variants available for this document type. Workflow forms should load the dropdown from this list rather than hardcoding values.\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:list, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "get_ledger_effect_options_get_quotes_setting_state_transition_ledger_effects",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Available ledger effects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_LedgerEffectOption"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/setting/status/{id}": {
      "put": {
        "tags": [
          "Quotes"
        ],
        "summary": "Update Status",
        "description": "Update Status\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:list, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_document_status_put_quotes_setting_status_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StatusFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Quotes"
        ],
        "summary": "Delete Status",
        "description": "Delete Status\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_status_delete_quotes_setting_status_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusFormResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/{id}": {
      "get": {
        "tags": [
          "Quotes"
        ],
        "summary": "Get Quote",
        "description": "Get {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:list, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_document_by_anchor_get_quotes_id",
        "parameters": [
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get document detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_Vec_DocumentDetailModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Quotes"
        ],
        "summary": "Update Quote",
        "description": "Update {{document_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_quotes_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update the document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/{id}/comment": {
      "get": {
        "tags": [
          "Quotes"
        ],
        "summary": "List comment",
        "description": "List comment\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_comment_get_quotes_id_comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_DocumentCommentModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Quotes"
        ],
        "summary": "Add comment",
        "description": "Add comment\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "add_comment_post_quotes_id_comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentCommentFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Add comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_DocumentCommentModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/{id}/comment/{comment_id}": {
      "delete": {
        "tags": [
          "Quotes"
        ],
        "summary": "Delete comment",
        "description": "Delete comment\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_comment_delete_quotes_id_comment_comment_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_DocumentCommentDeleteModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/{id}/mail/send": {
      "post": {
        "tags": [
          "Quotes"
        ],
        "summary": "Send via Email",
        "description": "Send via Email\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:send, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "send_mail_post_quotes_id_mail_send",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentMailFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Send Email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentMailFromResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:send",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/{id}/mail/{template_id}": {
      "get": {
        "tags": [
          "Quotes"
        ],
        "summary": "Get Mail Content",
        "description": "Get Mail Content\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:list, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_email_template_get_quotes_id_mail_template_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get Mail Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailTemplateTypeModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/{id}/meta-data": {
      "post": {
        "tags": [
          "Quotes"
        ],
        "summary": "Update meta data",
        "description": "Update meta data\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:list, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "meta_data_post_quotes_id_meta_data",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentMetaData"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update meta data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/quotes/{id}/state-transition": {
      "put": {
        "tags": [
          "Quotes"
        ],
        "summary": "Status Transition",
        "description": "Status Transition\n\nHyperlane requires a bearer JWT. Required permissions (any): quote:add, quote:edit, quote:list, quote:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "transition_to_put_quotes_id_state_transition",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransitionFromModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Status Transition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/ap-aging-summary": {
      "get": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Get accounts payable ageing summary",
        "description": "Get accounts payable ageing summary\n\nHyperlane requires a bearer JWT. Required permissions (any): report:ap-aging-summary, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "openapi_ap_aging_summary",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "aging_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get accounts payable ageing summary",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "DIMENSION_FILTER_UNSUPPORTED when `dimension_filter` is sent: only the income statement, general ledger, detailed general ledger and journal reports accept it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:ap-aging-summary",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/balance-sheet": {
      "get": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Get balance sheet",
        "description": "Get balance sheet\n\nHyperlane requires a bearer JWT. Required permissions (any): report:balance-sheet, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "openapi_balance_sheet",
        "parameters": [
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get balance sheet",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "DIMENSION_FILTER_UNSUPPORTED when `dimension_filter` is sent: only the income statement, general ledger, detailed general ledger and journal reports accept it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:balance-sheet",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/cash-flow": {
      "get": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Get cash flow statement",
        "description": "Get cash flow statement\n\nHyperlane requires a bearer JWT. Required permissions (any): report:general-ledger, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "openapi_cash_flow",
        "parameters": [
          {
            "name": "date_range",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get cash flow statement",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "DIMENSION_FILTER_UNSUPPORTED when `dimension_filter` is sent: only the income statement, general ledger, detailed general ledger and journal reports accept it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:general-ledger",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/control-account-exceptions": {
      "get": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "List control-account exception journals",
        "description": "List control-account exception journals\n\nHyperlane requires a bearer JWT. Required permissions (any): report:trial-balance, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "openapi_control_account_exceptions",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "before_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "before_journal_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cursor-paginated exception journals",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:trial-balance",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/control-account-exceptions/{journal_id}/review": {
      "post": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Acknowledge an exception on the exact journal version",
        "description": "Acknowledge an exception on the exact journal version\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:journal-edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "openapi_review_control_exception",
        "parameters": [
          {
            "name": "journal_id",
            "in": "path",
            "description": "Journal version ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExceptionReviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Review recorded; accounting balances unchanged",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:journal-edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/customer-statement": {
      "get": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Get a dated customer statement in company base currency",
        "description": "Get a dated customer statement in company base currency, using document booked rates\n\nHyperlane requires a bearer JWT. Required permissions (any): report:client-balance, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "openapi_customer_statement",
        "parameters": [
          {
            "name": "client",
            "in": "query",
            "description": "Customer id within the authenticated company.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_range",
            "in": "query",
            "description": "Inclusive ISO dates: YYYY-MM-DD,YYYY-MM-DD.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Opening balance, activity and closing balance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CustomerStatement"
                }
              }
            }
          },
          "400": {
            "description": "Invalid customer id or date range"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Requires report:client-balance permission"
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:client-balance",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/general-ledger": {
      "get": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Get general ledger",
        "description": "Get general ledger\n\nHyperlane requires a bearer JWT. Required permissions (any): report:general-ledger, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "openapi_general_ledger",
        "parameters": [
          {
            "name": "date_range",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "account",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "dimension_filter",
            "in": "query",
            "description": "Dimension filter: `<dimension_id>:<value_id>,<value_id>,unassigned;<dimension_id>:...`. AND across dimensions, OR within one dimension's list; a selected value includes its descendants; `unassigned` matches lines with no value for that dimension. At most 5 dimensions and 50 values each.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get general ledger",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "DIMENSION_INVALID_REQUEST: malformed dimension_filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "DIMENSION_NOT_FOUND or DIMENSION_VALUE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "DIMENSIONS_NOT_READY: dimensions are not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:general-ledger",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/general-ledger-detailed": {
      "get": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Get detailed general ledger",
        "description": "Get detailed general ledger\n\nHyperlane requires a bearer JWT. Required permissions (any): report:general-ledger-detailed, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "openapi_general_ledger_detailed",
        "parameters": [
          {
            "name": "date_range",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "account",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "dimension_filter",
            "in": "query",
            "description": "Dimension filter: `<dimension_id>:<value_id>,<value_id>,unassigned;<dimension_id>:...`. AND across dimensions, OR within one dimension's list; a selected value includes its descendants; `unassigned` matches lines with no value for that dimension. At most 5 dimensions and 50 values each.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get detailed general ledger",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "DIMENSION_INVALID_REQUEST: malformed dimension_filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "DIMENSION_NOT_FOUND or DIMENSION_VALUE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "DIMENSIONS_NOT_READY: dimensions are not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:general-ledger-detailed",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/health-summary": {
      "get": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Read bounded accounting health checks",
        "description": "Read bounded accounting health checks\n\nHyperlane requires a bearer JWT. Required permissions (any): report:trial-balance, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "openapi_health_summary",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Health status; incomplete scans are explicitly indicated",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:trial-balance",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/income-statement": {
      "get": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Get income statement",
        "description": "Get income statement\n\nHyperlane requires a bearer JWT. Required permissions (any): report:income-statement, report:balance-sheet, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "openapi_income_statement",
        "parameters": [
          {
            "name": "date_range",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "dimension_filter",
            "in": "query",
            "description": "Dimension filter: `<dimension_id>:<value_id>,<value_id>,unassigned;<dimension_id>:...`. AND across dimensions, OR within one dimension's list; a selected value includes its descendants; `unassigned` matches lines with no value for that dimension. At most 5 dimensions and 50 values each.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get income statement",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "DIMENSION_INVALID_REQUEST: malformed dimension_filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "DIMENSION_NOT_FOUND or DIMENSION_VALUE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "DIMENSIONS_NOT_READY: dimensions are not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:income-statement",
            "report:balance-sheet",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/journal-report": {
      "get": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Get journal report",
        "description": "Get journal report\n\nHyperlane requires a bearer JWT. Required permissions (any): report:journal, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "openapi_journal_report",
        "parameters": [
          {
            "name": "date_range",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "account",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "dimension_filter",
            "in": "query",
            "description": "Dimension filter: `<dimension_id>:<value_id>,<value_id>,unassigned;<dimension_id>:...`. AND across dimensions, OR within one dimension's list; a selected value includes its descendants; `unassigned` matches lines with no value for that dimension. At most 5 dimensions and 50 values each.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get journal report",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "DIMENSION_INVALID_REQUEST: malformed dimension_filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "404": {
            "description": "DIMENSION_NOT_FOUND or DIMENSION_VALUE_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "DIMENSIONS_NOT_READY: dimensions are not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:journal",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/source-posting-audit": {
      "get": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Inspect source posting outcomes and missing effects",
        "description": "By default returns missing, ambiguous or mismatched posting effects. include_complete=true also returns completed sources. Acceptance means the source exists in committed storage; completion requires all expected effects. Journal IDs, version anchors and hashes link to existing journal history/proof APIs. Legacy or unversioned relationships are labeled explicitly. Rejected transactions have no accepted source outcome; use the returned error and retry only transient failures.\n\nHyperlane requires a bearer JWT. Required permissions (any): report:trial-balance, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "openapi_source_posting_audit",
        "parameters": [
          {
            "name": "include_complete",
            "in": "query",
            "description": "Include complete accepted sources and their journal evidence; default false.",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "before_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "before_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Candidate-scanned source posting gaps",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:trial-balance",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/source-posting-audit/preview": {
      "post": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Preview a missing source posting without writing",
        "description": "Preview a missing source posting without writing\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:journal-add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "openapi_preview_posting_repair",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RepairRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:journal-add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/source-posting-audit/repair": {
      "post": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Repair a missing source posting after preview",
        "description": "Repair a missing source posting after preview\n\nHyperlane requires a bearer JWT. Required permissions (any): accounting:journal-add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "openapi_repair_posting",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RepairRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "accounting:journal-add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/reports/trial-balance": {
      "get": {
        "tags": [
          "Financial Reports"
        ],
        "summary": "Get trial balance",
        "description": "Get trial balance\n\nHyperlane requires a bearer JWT. Required permissions (any): report:trial-balance, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "openapi_trial_balance",
        "parameters": [
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get trial balance",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "DIMENSION_FILTER_UNSUPPORTED when `dimension_filter` is sent: only the income statement, general ledger, detailed general ledger and journal reports accept it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "report:trial-balance",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/settings/country": {
      "get": {
        "tags": [
          "Configuration & Reference Data"
        ],
        "summary": "List Standardized Countries",
        "description": "Returns a flat list of countries for use in address forms and tax residency validation. Includes ISO alpha-2 codes to ensure compatibility with global shipping and compliance providers.",
        "operationId": "get_all_country",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Country list retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountryListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": false
        }
      }
    },
    "/v1/settings/currency": {
      "get": {
        "tags": [
          "Configuration & Reference Data"
        ],
        "summary": "List Supported Currencies",
        "description": "Retrieves the registry of ISO-4217 compliant currencies supported by the system. Includes metadata such as native symbols and decimal precision required for accurate Quasar input rendering.",
        "operationId": "get_all_currency",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Currency registry retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrencyListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": false
        }
      }
    },
    "/v1/settings/currency-rate": {
      "get": {
        "tags": [
          "Configuration & Reference Data"
        ],
        "summary": "Fetch Specific Conversion Rate",
        "description": "Retrieves the exchange rate `1 base = rate target` between two ISO-4217 currencies. For an authenticated company, a custom FX window covering `at` (default now) takes precedence when the pair includes the company base currency (`source = custom`); otherwise the real-time or cached provider rate is returned (`source = automatic`). This is the primary endpoint for calculating transaction totals and tax liabilities in multi-currency environments.\n\nHyperlane requires a bearer JWT. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "get_exchange_rate",
        "parameters": [
          {
            "name": "base",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "at",
            "in": "query",
            "description": "Moment to resolve the rate for: `YYYY-MM-DD` (a company-local date, e.g. a\ndocument issue date) or an RFC 3339 timestamp. Defaults to now. Only selects the\ncompany custom FX window; the automatic fallback is always the latest provider rate.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Conversion rate successfully retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CurrencyExchangeRateResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true
        }
      }
    },
    "/v1/settings/currency-rates/resolve": {
      "post": {
        "tags": [
          "Configuration & Reference Data"
        ],
        "summary": "Resolve Exchange Rates (Batch)",
        "description": "Resolves up to 500 `1 base = rate target` lookups in one call, each for its own transaction date `at` (`YYYY-MM-DD` company-local, or RFC 3339; default today). Same rules as `GET /settings/currency-rate`: for an authenticated company a custom FX window covering the date wins when the pair includes the company base currency (`source = custom`), otherwise the provider rate (`source = automatic`). Automatic rates are the latest stored rate; `as_of_date_matched = false` flags an automatic rate returned for a past date. Items that cannot be resolved come back with `rate = null` and `error = RATE_NOT_FOUND`; malformed items fail the whole request with 400.\n\nHyperlane requires a bearer JWT. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "resolve_exchange_rates",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FxResolveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Rates resolved, in request order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_FxResolveResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed (currency codes, dates, 1–500 items)"
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true
        }
      }
    },
    "/v1/settings/locale": {
      "get": {
        "tags": [
          "Configuration & Reference Data"
        ],
        "summary": "List Localization Locales",
        "description": "Fetches a registry of supported regional locales (e.g., 'en_SG'). These strings guide the frontend on how to format dates, numbers, and currency strings based on the user's cultural context.",
        "operationId": "get_all_locale",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Locales retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocaleListModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": false
        }
      }
    },
    "/v1/settings/timezone": {
      "get": {
        "tags": [
          "Configuration & Reference Data"
        ],
        "summary": "List System Timezones",
        "description": "Returns a list of IANA-compliant timezones. This data is critical for accurate audit logging and ensuring that transaction 'locking periods' align with the organization's physical operating hours.",
        "operationId": "get_all_timezone",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Timezones retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TimezoneListModel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": false
        }
      }
    },
    "/v1/taxes": {
      "get": {
        "tags": [
          "Taxes & Submissions"
        ],
        "summary": "Tax List",
        "description": "Tax List\n\nHyperlane requires a bearer JWT. Required permissions (any): tax:add, tax:edit, tax:list, tax:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_taxes",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Tax List",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "tax:add",
            "tax:edit",
            "tax:list",
            "tax:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Taxes & Submissions"
        ],
        "summary": "Create Tax",
        "description": "Create Tax\n\nHyperlane requires a bearer JWT. Required permissions (any): tax:add, tax:edit, item:add, item:edit, invoice:add, invoice:edit, estimate:add, estimate:edit, credit-note:add, credit-note:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_taxes",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaxCreateModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Create Tax",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxCreateResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "tax:add",
            "tax:edit",
            "item:add",
            "item:edit",
            "invoice:add",
            "invoice:edit",
            "estimate:add",
            "estimate:edit",
            "credit-note:add",
            "credit-note:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/taxes/get-all": {
      "get": {
        "tags": [
          "Taxes & Submissions"
        ],
        "summary": "Get All Taxes",
        "description": "Get All Taxes\n\nHyperlane requires a bearer JWT. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_all_taxes",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Get All Taxes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_HashMap_String_TaxSharedModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true
        }
      }
    },
    "/v1/taxes/reports/submissions/{id}": {
      "get": {
        "tags": [
          "Taxes & Submissions"
        ],
        "summary": "Submitted Tax Report Detail",
        "description": "Submitted Tax Report Detail\n\nHyperlane requires a bearer JWT. Required permissions (any): tax:report-submit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_tax_report_submission",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Submitted Tax Report Detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TaxSubmissionDbModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "tax:report-submit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Taxes & Submissions"
        ],
        "summary": "Submitted Tax Report Archive",
        "description": "Submitted Tax Report Archive\n\nHyperlane requires a bearer JWT. Required permissions (any): tax:report-submit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "archive_report_submission",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Submitted Tax Report Archive",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TaxSubmissionDbModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "tax:report-submit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Taxes & Submissions"
        ],
        "summary": "Submitted Tax Report Delete",
        "description": "Submitted Tax Report Delete\n\nHyperlane requires a bearer JWT. Required permissions (any): tax:report-submit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_report_submission",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Submitted Tax Report Delete",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TaxSubmissionDbModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "tax:report-submit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/taxes/reports/submit": {
      "post": {
        "tags": [
          "Taxes & Submissions"
        ],
        "summary": "Submit Tax Report",
        "description": "Submit Tax Report\n\nHyperlane requires a bearer JWT. Required permissions (any): tax:report-submit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "submit_tax_report",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaxReportSubmissionRequestModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Submit Tax Report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_TaxReportSubmissionRequestModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "tax:report-submit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/taxes/{id}": {
      "get": {
        "tags": [
          "Taxes & Submissions"
        ],
        "summary": "Tax Detail",
        "description": "Tax Detail\n\nHyperlane requires a bearer JWT. Required permissions (any): tax:add, tax:edit, tax:list, tax:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "detail_get_taxes_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tax Detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxDetailResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "tax:add",
            "tax:edit",
            "tax:list",
            "tax:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Taxes & Submissions"
        ],
        "summary": "Update Tax",
        "description": "Update Tax\n\nHyperlane requires a bearer JWT. Required permissions (any): tax:add, tax:edit, item:add, item:edit, invoice:add, invoice:edit, estimate:add, estimate:edit, credit-note:add, credit-note:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_taxes_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaxUpdateModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update Tax",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxUpdateResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "tax:add",
            "tax:edit",
            "item:add",
            "item:edit",
            "invoice:add",
            "invoice:edit",
            "estimate:add",
            "estimate:edit",
            "credit-note:add",
            "credit-note:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Taxes & Submissions"
        ],
        "summary": "Delete Tax",
        "description": "Delete Tax\n\nHyperlane requires a bearer JWT. Required permissions (any): tax:add, tax:edit, item:add, item:edit, invoice:add, invoice:edit, estimate:add, estimate:edit, credit-note:add, credit-note:edit, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_delete_taxes_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete Tax",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxUpdateResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "tax:add",
            "tax:edit",
            "item:add",
            "item:edit",
            "invoice:add",
            "invoice:edit",
            "estimate:add",
            "estimate:edit",
            "credit-note:add",
            "credit-note:edit",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/vendors": {
      "get": {
        "tags": [
          "Vendors"
        ],
        "summary": "List Vendor",
        "description": "List {{people_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): vendor:add, vendor:edit, vendor:list, vendor:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "list_get_vendors",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "deleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of people (Clients/Vendors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "vendor:add",
            "vendor:edit",
            "vendor:list",
            "vendor:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Vendors"
        ],
        "summary": "Create Vendor",
        "description": "Create {{people_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): vendor:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_post_vendors",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeopleFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Create people (Clients/Vendors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "vendor:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/vendors/dimension-defaults/lookup": {
      "post": {
        "tags": [
          "Vendors"
        ],
        "summary": "Look up Vendor default dimensions",
        "description": "Batch read of the default dimension values saved on up to 100 clients or vendors, one call instead of one detail read per contact. A read sent as POST because the ids do not fit a query string. One entry per requested id, in request order; a contact with none, or an id that is not this tenant's contact of the asked type, has an empty state. The items list is empty while Dimensions is not activated, like the contact detail.\n\nHyperlane requires a bearer JWT. Required permissions (any): vendor:add, vendor:edit, vendor:list, vendor:view, invoice:add, invoice:edit, invoice:list, invoice:view, quote:add, quote:edit, quote:list, quote:view, credit-note:add, credit-note:edit, credit-note:list, credit-note:view, purchase-order:add, purchase-order:edit, purchase-order:list, purchase-order:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "dimension_defaults_lookup_post_vendors_dimension_defaults_lookup",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefaultsLookupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Defaults per contact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DefaultsLookupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Unknown people type, empty list, more than 100 ids, or a blank id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserErrorModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "vendor:add",
            "vendor:edit",
            "vendor:list",
            "vendor:view",
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "purchase-order:add",
            "purchase-order:edit",
            "purchase-order:list",
            "purchase-order:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/vendors/get-all": {
      "get": {
        "tags": [
          "Vendors"
        ],
        "summary": "List All Vendor",
        "description": "List All {{people_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): invoice:add, invoice:edit, invoice:list, invoice:view, quote:add, quote:edit, quote:list, quote:view, credit-note:add, credit-note:edit, credit-note:list, credit-note:view, purchase-order:add, purchase-order:edit, purchase-order:list, purchase-order:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "get_all_people_get_vendors_get_all",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get all of people (Clients/Vendors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleFullListResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "purchase-order:add",
            "purchase-order:edit",
            "purchase-order:list",
            "purchase-order:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/vendors/{id}": {
      "get": {
        "tags": [
          "Vendors"
        ],
        "summary": "Get Vendor",
        "description": "Get {{people_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): vendor:add, vendor:edit, vendor:list, vendor:view, invoice:add, invoice:edit, invoice:list, invoice:view, quote:add, quote:edit, quote:list, quote:view, credit-note:add, credit-note:edit, credit-note:list, credit-note:view, purchase-order:add, purchase-order:edit, purchase-order:list, purchase-order:view, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "detail_get_vendors_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get people detail (Clients/Vendors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleDetailResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "vendor:add",
            "vendor:edit",
            "vendor:list",
            "vendor:view",
            "invoice:add",
            "invoice:edit",
            "invoice:list",
            "invoice:view",
            "quote:add",
            "quote:edit",
            "quote:list",
            "quote:view",
            "credit-note:add",
            "credit-note:edit",
            "credit-note:list",
            "credit-note:view",
            "purchase-order:add",
            "purchase-order:edit",
            "purchase-order:list",
            "purchase-order:view",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Vendors"
        ],
        "summary": "Update Vendor",
        "description": "Update {{people_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): vendor:edit, vendor:add, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_put_vendors_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeopleFormModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Update people (Clients/Vendors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleFormResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "vendor:edit",
            "vendor:add",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Vendors"
        ],
        "summary": "Delete Vendor",
        "description": "Delete {{people_type}}\n\nHyperlane requires a bearer JWT. Required permissions (any): vendor:delete, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials. Hyperlane supplies backend context from the JWT or public route; injected fields are not caller query parameters.",
        "operationId": "delete_delete_vendors_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete people (Clients/Vendors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeopleDeleteResponseModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "vendor:delete",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/webhooks/endpoints": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook endpoints",
        "description": "List webhook endpoints\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "list_endpoints",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_EndpointResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Create a webhook endpoint",
        "description": "Create a webhook endpoint\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "create_endpoint",
        "parameters": [
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointSecretResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/webhooks/endpoints/{id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "get endpoint",
        "description": "get endpoint\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "get_endpoint",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "put": {
        "tags": [
          "Webhooks"
        ],
        "summary": "update endpoint",
        "description": "update endpoint\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "update_endpoint",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndpointRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "delete endpoint",
        "description": "delete endpoint\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "delete_endpoint",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/webhooks/endpoints/{id}/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "list deliveries",
        "description": "list deliveries\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "list_deliveries",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DeliveryListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/webhooks/endpoints/{id}/deliveries/{delivery_id}/resend": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "resend delivery",
        "description": "resend delivery\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "resend_delivery",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ResendDeliveryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/webhooks/endpoints/{id}/pause": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "pause endpoint",
        "description": "pause endpoint\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "pause_endpoint",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/webhooks/endpoints/{id}/resume": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "resume endpoint",
        "description": "resume endpoint\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "resume_endpoint",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/webhooks/endpoints/{id}/reveal-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "reveal endpoint secret",
        "description": "reveal endpoint secret\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "reveal_endpoint_secret",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RevealSecretResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/webhooks/endpoints/{id}/rotate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "rotate endpoint secret",
        "description": "rotate endpoint secret\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "rotate_endpoint_secret",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EndpointSecretResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/webhooks/endpoints/{id}/verify": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "verify endpoint",
        "description": "verify endpoint\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:manage, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "verify_endpoint",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-data-signature",
            "in": "header",
            "description": "Required only for web_app browser-session writes. App Connect bearer clients do not send this header.",
            "required": false,
            "x-required-for-audience": [
              "web_app"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_VerifyEndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed for one or more fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "412": {
            "description": "Security check failed (Signature or JTI invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecurityErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:manage",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    },
    "/v1/webhooks/event-types": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List available webhook event types",
        "description": "List available webhook event types\n\nHyperlane requires a bearer JWT. Required permissions (any): webhook:list, role:admin. Audience and session binding checks also apply. A browser session route is not automatically available to partner credentials.",
        "operationId": "event_types",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Partner-filtered webhook event catalog",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EventCatalogResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: JWT Bearer token missing or expired."
          },
          "403": {
            "description": "Webhooks are disabled for this partner"
          },
          "500": {
            "description": "Internal Server Error: An unexpected error occurred on the server.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-hyperlane-auth": {
          "bearer": true,
          "scopes": [
            "webhook:list",
            "role:admin"
          ],
          "scopes_matcher": "any"
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "AclCompanyRoleDbModel": {
        "type": "object",
        "required": [
          "id",
          "company_id",
          "role_name",
          "role_permission",
          "created_at",
          "updated_by",
          "is_active",
          "is_system_defined"
        ],
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_system_defined": {
            "type": "boolean"
          },
          "role_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "role_name": {
            "type": "string"
          },
          "role_permission": {
            "type": "string"
          },
          "role_permission_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_by": {
            "type": "string"
          }
        }
      },
      "AclCompanyRoleFormModel": {
        "type": "object",
        "properties": {
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "role_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "role_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "role_permission": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AclCompanyRoleFormResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AclCompanyRoleDbModel"
          }
        }
      },
      "AclCompanyRolePermission": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AclUserRolePermission"
          }
        }
      },
      "AclModuleDbModel": {
        "type": "object",
        "required": [
          "id",
          "module",
          "is_active",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "module": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "AclModuleListResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AclModuleDbModel"
            }
          }
        }
      },
      "AclUserRolePermission": {
        "type": "object",
        "required": [
          "id",
          "company_id",
          "role_name",
          "role_permission",
          "created_at",
          "is_system_defined"
        ],
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "is_system_defined": {
            "type": "boolean"
          },
          "role_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "role_name": {
            "type": "string"
          },
          "role_permission": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "role_permission_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_by": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Action": {
        "type": "object",
        "required": [
          "key",
          "label",
          "description",
          "color",
          "icon",
          "disabled",
          "confirmation_required",
          "action_type"
        ],
        "properties": {
          "action_type": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "confirmation_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "confirmation_required": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "disabled": {
            "type": "boolean"
          },
          "icon": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "primary": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "target_status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ExpenseStatus"
              }
            ]
          }
        }
      },
      "ActionConfirmationMethod": {
        "type": "string",
        "enum": [
          "email",
          "totp"
        ]
      },
      "ActivityActorSourceModel": {
        "type": "object",
        "required": [
          "source_type"
        ],
        "properties": {
          "app_connect_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "app_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_type": {
            "type": "string"
          }
        }
      },
      "ActivityCursorPaginationModel": {
        "type": "object",
        "required": [
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ActivityCursorResponseModel": {
        "type": "object",
        "required": [
          "data",
          "pagination"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CursorActivityModel"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/ActivityCursorPaginationModel"
          }
        }
      },
      "ActivityDbModel": {
        "type": "object",
        "required": [
          "id",
          "acl_module_id",
          "user_id",
          "company_id",
          "activity",
          "created_at"
        ],
        "properties": {
          "acl_module_id": {
            "type": "string"
          },
          "activity": {
            "type": "string"
          },
          "activity_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "message_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "message_params": {},
          "user_id": {
            "type": "string"
          }
        }
      },
      "ActivityListResponseModel": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ActivityCursorResponseModel"
          },
          {
            "$ref": "#/components/schemas/UserActivityListResponseModel"
          }
        ]
      },
      "ApiResponse_BankAccountsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "balances",
              "accounts"
            ],
            "properties": {
              "accounts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BankingAccountModel"
                }
              },
              "balances": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvailableBalanceResult"
                  }
                },
                "propertyNames": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ApiResponse_BankingAccountDeleteResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "deleted_id"
            ],
            "properties": {
              "deleted_id": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_BankingAccountDetailModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "name",
              "currency"
            ],
            "properties": {
              "account_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "account_subtype_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "currency": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "is_archived": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "kind": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "parent_account_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tag": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ApiResponse_BankingAccountSubtypeFormResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "name",
              "account_type_id"
            ],
            "properties": {
              "account_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "account_type_id": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_BankingAccountSubtypeListModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "name",
              "account_type_id"
            ],
            "properties": {
              "account_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "account_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "account_type_id": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_BankingAccountWithStats": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "name",
              "currency",
              "account_type",
              "account_subtype",
              "is_archived",
              "is_system_defined",
              "account_kind",
              "created_at"
            ],
            "properties": {
              "account_kind": {
                "type": "string"
              },
              "account_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "account_subtype": {
                "type": "string"
              },
              "account_subtype_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "account_type": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "currency": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "excluded_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "id": {
                "type": "string"
              },
              "is_archived": {
                "type": "boolean"
              },
              "is_system_defined": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "parent_account_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tag": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "uncategorized_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "unreconciled_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              }
            }
          }
        }
      },
      "ApiResponse_BankingJournalDeleteResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "deleted"
            ],
            "properties": {
              "deleted": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BankingJournalDeleteModel"
                }
              }
            }
          }
        }
      },
      "ApiResponse_BankingJournalFormResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "journal"
            ],
            "properties": {
              "journal": {
                "$ref": "#/components/schemas/BankingJournalHeaderModel"
              }
            }
          }
        }
      },
      "ApiResponse_BankingJournalListModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "total_records",
              "page_size",
              "page_number",
              "journals"
            ],
            "properties": {
              "journals": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BankingJournalModel"
                }
              },
              "page_number": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "page_size": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "total_records": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              }
            }
          }
        }
      },
      "ApiResponse_BankingMatchPolicyListModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "default_policy_id",
              "policies"
            ],
            "properties": {
              "default_policy_id": {
                "type": "string"
              },
              "policies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BankingMatchPolicyModel"
                }
              }
            }
          }
        }
      },
      "ApiResponse_BankingMatchPolicySettingModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "company_id",
              "default_policy_id"
            ],
            "properties": {
              "company_id": {
                "type": "string"
              },
              "default_policy_id": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_BankingReconciliationListModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "total_records",
              "page_size",
              "page_number",
              "reconciliations"
            ],
            "properties": {
              "page_number": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "page_size": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "reconciliations": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BankingReconciliationModel"
                }
              },
              "total_records": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              }
            }
          }
        }
      },
      "ApiResponse_BankingReconciliationModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "user_id",
              "banking_account_id",
              "start_date",
              "end_date",
              "closing_balance",
              "status",
              "created_at",
              "lines",
              "attachments"
            ],
            "properties": {
              "attachments": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BankingReconciliationAttachmentModel"
                }
              },
              "banking_account_id": {
                "type": "string"
              },
              "calculated_balance": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "closing_balance": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "diff": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "end_date": {
                "type": "string",
                "format": "date"
              },
              "id": {
                "type": "string"
              },
              "lines": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BankingReconciliationLineModel"
                }
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "opening_balance": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reconciled_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "start_date": {
                "type": "string",
                "format": "date"
              },
              "status": {
                "type": "string"
              },
              "user_id": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_BankingTransactionDbModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "banking_account_id",
              "date",
              "amount",
              "currency",
              "is_auto_matched",
              "is_ignored",
              "is_reconciled",
              "transaction_hash",
              "exchange_rate",
              "is_posted",
              "available_balance",
              "transaction_type"
            ],
            "properties": {
              "amount": {
                "type": "string"
              },
              "available_balance": {
                "type": "string"
              },
              "banking_account_id": {
                "type": "string"
              },
              "company_bank_link_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "credit_account_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "currency": {
                "type": "string"
              },
              "date": {
                "type": "string",
                "format": "date"
              },
              "debit_account_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entity": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entity_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "exchange_rate": {
                "type": "string"
              },
              "external_account_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_transaction_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "ignore_reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_auto_matched": {
                "type": "boolean"
              },
              "is_ignored": {
                "type": "boolean"
              },
              "is_posted": {
                "type": "boolean"
              },
              "is_reconciled": {
                "type": "boolean"
              },
              "meta_data": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Value"
                  }
                ]
              },
              "transaction_hash": {
                "type": "string"
              },
              "transaction_identifier": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "transaction_type": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "user_id": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "ApiResponse_BankingTransactionListModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "policy_id",
              "total_records",
              "page_size",
              "page_number",
              "transactions"
            ],
            "properties": {
              "page_number": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "page_size": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "policy_id": {
                "type": "string"
              },
              "total_records": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "transactions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BankingTransactionModel"
                }
              }
            }
          }
        }
      },
      "ApiResponse_CurrencyExchangeRateResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "base",
              "target",
              "rate",
              "time"
            ],
            "properties": {
              "as_of_date_matched": {
                "type": "boolean",
                "description": "`false` when an automatic rate was returned for a date before today: no\nhistorical provider rates are stored, so it is the latest rate, not that day's.\nCustom rates always match their date."
              },
              "base": {
                "type": "string"
              },
              "custom_rate_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Id of the custom window that produced the rate (only when `source = custom`)."
              },
              "rate": {
                "type": "string",
                "description": "`1 base = rate target`."
              },
              "source": {
                "$ref": "#/components/schemas/FxRateSource",
                "description": "Rate source; defaults to `automatic` when omitted."
              },
              "target": {
                "type": "string"
              },
              "time": {
                "type": "string",
                "format": "date-time",
                "description": "Automatic: provider timestamp of the rate. Custom: the window's `effective_from` (UTC)."
              }
            }
          }
        }
      },
      "ApiResponse_CustomerStatement": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "client",
              "date_range",
              "currencies"
            ],
            "properties": {
              "client": {
                "type": "string"
              },
              "currencies": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CurrencyStatement"
                },
                "description": "One company-base-currency group; source amounts use document booked rates."
              },
              "date_range": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_DeliveryListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "items",
              "page",
              "per_page",
              "total"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DeliveryResponse"
                }
              },
              "page": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "per_page": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              }
            }
          }
        }
      },
      "ApiResponse_EndpointResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "url",
              "spec_version",
              "status",
              "enabled_events",
              "header_names",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "enabled_events": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "header_names": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Configured names only. Secret header values are never returned."
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "spec_version": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_EndpointSecretResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EndpointResponse"
              },
              {
                "type": "object",
                "required": [
                  "signing_secret"
                ],
                "properties": {
                  "signing_secret": {
                    "type": "string",
                    "description": "Returned only when a secret is created or rotated. It cannot be retrieved later."
                  }
                }
              }
            ]
          }
        }
      },
      "ApiResponse_EventCatalogResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "spec_version",
              "protocol",
              "business_areas"
            ],
            "properties": {
              "business_areas": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EventBusinessArea"
                }
              },
              "protocol": {
                "$ref": "#/components/schemas/WebhookProtocolResponse"
              },
              "spec_version": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_FxResolveResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FxResolveResult"
                }
              }
            }
          }
        }
      },
      "ApiResponse_HashMap_String_TaxSharedModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "required": [
                "id",
                "tax_name",
                "tax_value",
                "tax_type",
                "category",
                "display_label",
                "is_recoverable"
              ],
              "properties": {
                "category": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "display_label": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "is_recoverable": {
                  "type": "boolean"
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tax_group_ids": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tax_name": {
                  "type": "string"
                },
                "tax_type": {
                  "type": "string"
                },
                "tax_value": {
                  "type": "string"
                }
              }
            },
            "propertyNames": {
              "type": "string"
            }
          }
        }
      },
      "ApiResponse_ItemModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "user_id",
              "company_id",
              "sku",
              "item_name",
              "item_quantity",
              "item_cost",
              "is_active",
              "item_type",
              "has_sales_price",
              "sales_price",
              "sales_currency",
              "has_purchase_price",
              "purchase_price",
              "purchase_currency"
            ],
            "properties": {
              "barcode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "company_id": {
                "type": "string"
              },
              "cost_for_client": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "dimension_state": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DimensionState"
                  }
                ]
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_source": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "has_purchase_price": {
                "type": "boolean"
              },
              "has_sales_price": {
                "type": "boolean"
              },
              "id": {
                "type": "string"
              },
              "is_active": {
                "type": "boolean"
              },
              "item_attribute": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/components/schemas/ItemAttModel"
                }
              },
              "item_cost": {
                "type": "string"
              },
              "item_description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "item_name": {
                "type": "string"
              },
              "item_quantity": {
                "type": "string"
              },
              "item_tax": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "item_type": {
                "type": "string"
              },
              "item_unit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "pricing": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ItemPriceResult"
                  }
                ]
              },
              "purchase_account_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "purchase_currency": {
                "type": "string"
              },
              "purchase_description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "purchase_price": {
                "type": "string"
              },
              "purchase_tax_ids": {},
              "sales_account_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sales_currency": {
                "type": "string"
              },
              "sales_description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sales_price": {
                "type": "string"
              },
              "sales_tax_ids": {},
              "sku": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "user_id": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_JournalDetailResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "anchor_id",
              "version_number",
              "is_current",
              "identifier",
              "date",
              "description",
              "currency",
              "exchange_rate",
              "is_locked",
              "is_posted",
              "is_reversal",
              "is_voided",
              "is_manual",
              "created_at",
              "lines",
              "is_manual_override",
              "version_history"
            ],
            "properties": {
              "anchor_id": {
                "type": "string",
                "description": "Stable identity of the journal across versions. Use this for links and\nfor the anchor_id path parameter on GET, PUT, DELETE and void."
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "currency": {
                "type": "string"
              },
              "date": {
                "type": "string",
                "format": "date"
              },
              "description": {
                "type": "string"
              },
              "dimension_capture": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/JournalDimensionCaptureState"
                  }
                ]
              },
              "entity_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entity_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "exchange_rate": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "description": "Id of this version row. Changes on every restatement; do not store it as\nthe journal's identity."
              },
              "identifier": {
                "type": "string"
              },
              "is_current": {
                "type": "boolean",
                "description": "True on the version the books use. Exactly one version is current."
              },
              "is_locked": {
                "type": "boolean"
              },
              "is_manual": {
                "type": "boolean"
              },
              "is_manual_override": {
                "type": "boolean"
              },
              "is_posted": {
                "type": "boolean"
              },
              "is_reversal": {
                "type": "boolean"
              },
              "is_voided": {
                "type": "boolean"
              },
              "lines": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/JournalLineItem"
                }
              },
              "meta_data": {},
              "override_reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prev_hash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reference": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "related_entity_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "related_entity_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reversal_of": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source_document_version_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version_history": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/JournalVersionHistoryItem"
                }
              },
              "version_number": {
                "type": "integer",
                "format": "int32",
                "description": "1 for the original posting, +1 per restatement or void."
              }
            }
          }
        }
      },
      "ApiResponse_JournalVoidResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "success",
              "error"
            ],
            "properties": {
              "error": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/JournalVoidError"
                }
              },
              "success": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/JournalVoidSuccess"
                }
              }
            }
          }
        }
      },
      "ApiResponse_MatchGroupTransactionResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "policy_id",
              "matches"
            ],
            "properties": {
              "matches": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MatchModel"
                }
              },
              "policy_id": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_Option_DocumentCommentModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "id",
                  "document_id",
                  "user_id",
                  "company_id",
                  "comment",
                  "created_at",
                  "is_internal"
                ],
                "properties": {
                  "comment": {
                    "type": "string"
                  },
                  "company_id": {
                    "type": "string"
                  },
                  "company_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "document_id": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "is_internal": {
                    "type": "boolean"
                  },
                  "user_contact": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "user_email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "user_id": {
                    "type": "string"
                  }
                }
              }
            ]
          }
        }
      },
      "ApiResponse_Option_DocumentListModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "total_records",
                  "page_size",
                  "page_number",
                  "docs"
                ],
                "properties": {
                  "docs": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/DocModel"
                    }
                  },
                  "page_number": {
                    "type": "integer",
                    "format": "int64",
                    "minimum": 0
                  },
                  "page_size": {
                    "type": "integer",
                    "format": "int64",
                    "minimum": 0
                  },
                  "total_records": {
                    "type": "integer",
                    "format": "int64",
                    "minimum": 0
                  }
                }
              }
            ]
          }
        }
      },
      "ApiResponse_Option_ItemModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "id",
                  "user_id",
                  "company_id",
                  "sku",
                  "item_name",
                  "item_quantity",
                  "item_cost",
                  "is_active",
                  "item_type",
                  "has_sales_price",
                  "sales_price",
                  "sales_currency",
                  "has_purchase_price",
                  "purchase_price",
                  "purchase_currency"
                ],
                "properties": {
                  "barcode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "type": "string"
                  },
                  "cost_for_client": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "created_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "deleted_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "dimension_state": {
                    "oneOf": [
                      {
                        "type": "null"
                      },
                      {
                        "$ref": "#/components/schemas/DimensionState"
                      }
                    ]
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "external_source": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "has_purchase_price": {
                    "type": "boolean"
                  },
                  "has_sales_price": {
                    "type": "boolean"
                  },
                  "id": {
                    "type": "string"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "item_attribute": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "$ref": "#/components/schemas/ItemAttModel"
                    }
                  },
                  "item_cost": {
                    "type": "string"
                  },
                  "item_description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "item_name": {
                    "type": "string"
                  },
                  "item_quantity": {
                    "type": "string"
                  },
                  "item_tax": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "item_type": {
                    "type": "string"
                  },
                  "item_unit": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "pricing": {
                    "oneOf": [
                      {
                        "type": "null"
                      },
                      {
                        "$ref": "#/components/schemas/ItemPriceResult"
                      }
                    ]
                  },
                  "purchase_account_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "purchase_currency": {
                    "type": "string"
                  },
                  "purchase_description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "purchase_price": {
                    "type": "string"
                  },
                  "purchase_tax_ids": {},
                  "sales_account_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "sales_currency": {
                    "type": "string"
                  },
                  "sales_description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "sales_price": {
                    "type": "string"
                  },
                  "sales_tax_ids": {},
                  "sku": {
                    "type": "string"
                  },
                  "updated_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "user_id": {
                    "type": "string"
                  }
                }
              }
            ]
          }
        }
      },
      "ApiResponse_Option_Vec_DocumentDetailModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "user_id",
                    "company_id",
                    "currency",
                    "people_id",
                    "document_type_id",
                    "template_id",
                    "document_status",
                    "document_number_sequence",
                    "document_number",
                    "document_issue_date",
                    "document_sub_total",
                    "document_total",
                    "document_net_balance",
                    "document_gross_total",
                    "document_exchange_rate",
                    "created_at",
                    "anchor_id",
                    "document_version_id",
                    "version_number",
                    "is_current",
                    "items",
                    "document_payment_method",
                    "document_attribute",
                    "document_adjustment",
                    "document_contact",
                    "document_payment",
                    "document_attachment",
                    "document_comment",
                    "document_status_history",
                    "version_history"
                  ],
                  "properties": {
                    "anchor_id": {
                      "type": "string"
                    },
                    "buyer_company_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "calculation": {
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "$ref": "#/components/schemas/CalculatorResponse"
                        }
                      ]
                    },
                    "company_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "dimension_state": {
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "$ref": "#/components/schemas/DimensionState"
                        }
                      ]
                    },
                    "document_address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document_adjustment": {
                      "type": "object"
                    },
                    "document_attachment": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "document_attribute": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "document_comment": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "document_contact": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "document_delivery_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "document_due_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "document_exchange_rate": {
                      "type": "string"
                    },
                    "document_gross_total": {
                      "type": "string"
                    },
                    "document_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document_issue_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "document_late_fee_amount": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document_net_balance": {
                      "type": "string"
                    },
                    "document_notes": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document_number": {
                      "type": "string"
                    },
                    "document_number_prefix": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document_number_sequence": {
                      "type": "string"
                    },
                    "document_number_suffix": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document_payment": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "document_payment_method": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "document_po_number": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document_schedule_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "document_shipping_address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document_state": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int64"
                    },
                    "document_status": {
                      "type": "string"
                    },
                    "document_status_history": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "document_status_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document_sub_total": {
                      "type": "string"
                    },
                    "document_terms": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document_title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document_total": {
                      "type": "string"
                    },
                    "document_type_id": {
                      "type": "string"
                    },
                    "document_version_id": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "is_current": {
                      "type": "boolean"
                    },
                    "is_partial_payment_allowed": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "is_recurring": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "late_fee_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "meta_data": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "min_payment_amount": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "payment_gateway_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "people_data": {},
                    "people_id": {
                      "type": "string"
                    },
                    "people_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "recurring": {
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "$ref": "#/components/schemas/DocumentRecurringModel"
                        }
                      ]
                    },
                    "recurring_document_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "seller_company_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "template_id": {
                      "type": "string"
                    },
                    "threshold_crossed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "user_id": {
                      "type": "string"
                    },
                    "version_history": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "version_number": {
                      "type": "integer",
                      "format": "int32"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "ApiResponse_ReconciliationFormResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "company_id",
              "user_id",
              "banking_account_id",
              "start_date",
              "end_date",
              "closing_balance",
              "status",
              "created_at"
            ],
            "properties": {
              "banking_account_id": {
                "type": "string"
              },
              "calculated_balance": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "closing_balance": {
                "type": "string"
              },
              "company_id": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "diff": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "end_date": {
                "type": "string",
                "format": "date"
              },
              "id": {
                "type": "string"
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "opening_balance": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reconciled_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "start_date": {
                "type": "string",
                "format": "date"
              },
              "status": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "user_id": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_ResendDeliveryResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "delivery_id",
              "event_id",
              "status",
              "attempt_number"
            ],
            "properties": {
              "attempt_number": {
                "type": "integer",
                "format": "int64"
              },
              "delivery_id": {
                "type": "string"
              },
              "event_id": {
                "type": "string"
              },
              "status": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_RevealSecretResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "signing_secret"
            ],
            "properties": {
              "signing_secret": {
                "type": "string",
                "description": "Current endpoint signing secret. Never persisted in logs or client storage."
              }
            }
          }
        }
      },
      "ApiResponse_TaxReportSubmissionRequestModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "company_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "date_range": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "report_key": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "user_id": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "ApiResponse_TaxSubmissionDbModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "company_id",
              "user_id",
              "tax_report_id",
              "report_key",
              "report_label",
              "period_label",
              "period_start",
              "period_end",
              "payload",
              "status",
              "created_at"
            ],
            "properties": {
              "company_id": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string"
              },
              "is_archived": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "payload": {},
              "period_end": {
                "type": "string"
              },
              "period_label": {
                "type": "string"
              },
              "period_start": {
                "type": "string"
              },
              "report_key": {
                "type": "string"
              },
              "report_label": {
                "type": "string"
              },
              "retry_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "retry_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "status": {
                "type": "string"
              },
              "tax_report_id": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "user_id": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_TransactionDetailModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "banking_account_id",
              "date",
              "amount",
              "currency",
              "is_auto_matched",
              "is_ignored",
              "is_reconciled",
              "transaction_hash",
              "exchange_rate",
              "is_posted",
              "available_balance",
              "transaction_type",
              "mapping"
            ],
            "properties": {
              "amount": {
                "type": "string"
              },
              "available_balance": {
                "type": "string"
              },
              "banking_account_id": {
                "type": "string"
              },
              "company_bank_link_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "credit_account_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "currency": {
                "type": "string"
              },
              "date": {
                "type": "string",
                "format": "date"
              },
              "debit_account_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entity": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entity_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "exchange_rate": {
                "type": "string"
              },
              "external_account_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_transaction_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "ignore_reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_auto_matched": {
                "type": "boolean"
              },
              "is_ignored": {
                "type": "boolean"
              },
              "is_posted": {
                "type": "boolean"
              },
              "is_reconciled": {
                "type": "boolean"
              },
              "mapping": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BankingTransactionEntityMappingModel"
                }
              },
              "meta_data": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Value"
                  }
                ]
              },
              "transaction_hash": {
                "type": "string"
              },
              "transaction_identifier": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "transaction_type": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "user_id": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "ApiResponse_Vec_BankingAccountModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "account_code",
                "is_contra"
              ],
              "properties": {
                "account": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "account_code": {
                  "type": "string"
                },
                "account_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "account_subtype": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "account_subtype_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "account_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_reconciliation_count": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64"
                },
                "currency": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "draft_reconciliation_count": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64"
                },
                "excluded_count": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64"
                },
                "id": {
                  "type": "string"
                },
                "is_archived": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "is_contra": {
                  "type": "boolean"
                },
                "is_system_defined": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "kind": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "parent_account": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "parent_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tag": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uncategorized_count": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_BankingAccountTypeModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "account_name"
              ],
              "properties": {
                "account_name": {
                  "type": "string"
                },
                "account_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "account_subtype": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "$ref": "#/components/schemas/BankingAccountSubtypeModel"
                  }
                },
                "id": {
                  "type": "string"
                },
                "total": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_DocumentCommentDeleteModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "comment_id"
              ],
              "properties": {
                "comment_id": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_DocumentCommentModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "document_id",
                "user_id",
                "company_id",
                "comment",
                "created_at",
                "is_internal"
              ],
              "properties": {
                "comment": {
                  "type": "string"
                },
                "company_id": {
                  "type": "string"
                },
                "company_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "document_id": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "is_internal": {
                  "type": "boolean"
                },
                "user_contact": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "user_email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "user_id": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_EndpointResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "url",
                "spec_version",
                "status",
                "enabled_events",
                "header_names",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "enabled_events": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "header_names": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Configured names only. Secret header values are never returned."
                },
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "spec_version": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "updated_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "url": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_JournalDetailResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "anchor_id",
                "version_number",
                "is_current",
                "identifier",
                "date",
                "description",
                "currency",
                "exchange_rate",
                "is_locked",
                "is_posted",
                "is_reversal",
                "is_voided",
                "is_manual",
                "created_at",
                "lines",
                "is_manual_override",
                "version_history"
              ],
              "properties": {
                "anchor_id": {
                  "type": "string",
                  "description": "Stable identity of the journal across versions. Use this for links and\nfor the anchor_id path parameter on GET, PUT, DELETE and void."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "currency": {
                  "type": "string"
                },
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "description": {
                  "type": "string"
                },
                "dimension_capture": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/JournalDimensionCaptureState"
                    }
                  ]
                },
                "entity_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "entity_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "exchange_rate": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "description": "Id of this version row. Changes on every restatement; do not store it as\nthe journal's identity."
                },
                "identifier": {
                  "type": "string"
                },
                "is_current": {
                  "type": "boolean",
                  "description": "True on the version the books use. Exactly one version is current."
                },
                "is_locked": {
                  "type": "boolean"
                },
                "is_manual": {
                  "type": "boolean"
                },
                "is_manual_override": {
                  "type": "boolean"
                },
                "is_posted": {
                  "type": "boolean"
                },
                "is_reversal": {
                  "type": "boolean"
                },
                "is_voided": {
                  "type": "boolean"
                },
                "lines": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JournalLineItem"
                  }
                },
                "meta_data": {},
                "override_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "prev_hash": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reference": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "related_entity_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "related_entity_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reversal_of": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source_document_version_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version_history": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JournalVersionHistoryItem"
                  }
                },
                "version_number": {
                  "type": "integer",
                  "format": "int32",
                  "description": "1 for the original posting, +1 per restatement or void."
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_LedgerEffectOption": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One dropdown row for the workflow form. Built from [`LedgerEffect::iter`],\nso a new enum variant appears in the API without a frontend change.\n`label` and `description` are i18n keys (`ledger_effect.{value}.label`),\nnot display copy — clients translate them.",
              "required": [
                "value",
                "label",
                "description"
              ],
              "properties": {
                "description": {
                  "type": "string",
                  "description": "i18n key, e.g. `ledger_effect.post.description`."
                },
                "label": {
                  "type": "string",
                  "description": "i18n key, e.g. `ledger_effect.post.label`."
                },
                "value": {
                  "$ref": "#/components/schemas/LedgerEffect"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_String": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ApiResponse_Vec_TransitionListModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "document_type_id",
                "from_state",
                "to_state",
                "ledger_effect"
              ],
              "properties": {
                "document_type_id": {
                  "type": "string"
                },
                "from_state": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "is_manual_allowed": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "is_user_defined": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "ledger_effect": {
                  "type": "string"
                },
                "to_state": {
                  "type": "string"
                },
                "transition_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "transition_note": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        }
      },
      "ApiResponse_VerifyEndpointResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "verified",
              "status"
            ],
            "properties": {
              "status": {
                "type": "string"
              },
              "verified": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "ApiResponse_u64": {
        "type": "object",
        "properties": {
          "data": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "AppConnectActionConfirmationForm": {
        "type": "object",
        "properties": {
          "confirmation_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "confirmation_context": {
            "type": [
              "string",
              "null"
            ]
          },
          "confirmation_entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "confirmation_method": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppConnectActionConfirmationMethod"
              }
            ]
          }
        }
      },
      "AppConnectActionConfirmationMethod": {
        "type": "string",
        "enum": [
          "email",
          "totp"
        ]
      },
      "ApplyCreditFromModel": {
        "type": "object",
        "properties": {
          "anchor_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "credits": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CreditNoteFromModel"
            }
          },
          "document_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ApplyCreditFromResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "AttachmentModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AttributeModel": {
        "type": "object",
        "properties": {
          "attribute_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribute_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AuthenticatedActionChallengeForm": {
        "type": "object",
        "properties": {
          "confirmation_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "confirmation_context": {
            "type": [
              "string",
              "null"
            ]
          },
          "confirmation_entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "confirmation_method": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ActionConfirmationMethod"
              }
            ]
          }
        }
      },
      "AuthenticatedEmailConfirmationCodeRequest": {
        "type": "object",
        "properties": {
          "confirmation_context": {
            "type": [
              "string",
              "null"
            ]
          },
          "confirmation_entity_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AvailableBalanceResult": {
        "type": "object",
        "required": [
          "account_id",
          "available_balance",
          "currency",
          "as_of_date"
        ],
        "properties": {
          "account_id": {
            "type": "string"
          },
          "as_of_date": {
            "type": "string",
            "format": "date"
          },
          "available_balance": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        }
      },
      "BankingAccountFormModel": {
        "type": "object",
        "properties": {
          "account": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_subtype": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_archived": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_contra": {
            "type": "boolean"
          },
          "is_sub_account": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "tag": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BankingAccountModel": {
        "type": "object",
        "required": [
          "id",
          "account_code",
          "is_contra"
        ],
        "properties": {
          "account": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_code": {
            "type": "string"
          },
          "account_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_subtype": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_subtype_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "completed_reconciliation_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "draft_reconciliation_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "excluded_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "id": {
            "type": "string"
          },
          "is_archived": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_contra": {
            "type": "boolean"
          },
          "is_system_defined": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_account": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "tag": {
            "type": [
              "string",
              "null"
            ]
          },
          "uncategorized_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        }
      },
      "BankingAccountNewModel": {
        "type": "object",
        "required": [
          "id",
          "account_code",
          "account_name",
          "is_archived",
          "is_system_defined",
          "is_contra"
        ],
        "properties": {
          "account_code": {
            "type": "string"
          },
          "account_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_name": {
            "type": "string"
          },
          "account_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_subtype_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "balance": {
            "type": [
              "string",
              "null"
            ]
          },
          "child_account": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/BankingAccountNewModel"
            }
          },
          "credit": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "debit": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_archived": {
            "type": "boolean"
          },
          "is_contra": {
            "type": "boolean"
          },
          "is_system_defined": {
            "type": "boolean"
          },
          "parent_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        }
      },
      "BankingAccountSubtypeFormModel": {
        "type": "object",
        "properties": {
          "account_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_archived": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "type_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "BankingAccountSubtypeModel": {
        "type": "object",
        "required": [
          "id",
          "account_name"
        ],
        "properties": {
          "account": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/BankingAccountNewModel"
            }
          },
          "account_name": {
            "type": "string"
          },
          "account_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "total": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "BankingJournalDeleteModel": {
        "type": "object",
        "required": [
          "journal_id",
          "identifier"
        ],
        "properties": {
          "identifier": {
            "type": "string"
          },
          "journal_id": {
            "type": "string"
          }
        }
      },
      "BankingJournalFormModel": {
        "type": "object",
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_manual": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "lines": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/JournalLineModel"
            }
          },
          "meta_data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/JournalEntryMetadata"
              }
            ]
          },
          "override": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "override_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "posted": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "reversal_of": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_document_version_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "version_number": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "BankingJournalHeaderModel": {
        "type": "object",
        "required": [
          "id",
          "anchor_id",
          "version_number",
          "is_current",
          "user_id",
          "company_id",
          "date",
          "currency",
          "transaction_hash",
          "exchange_rate",
          "is_locked",
          "created_at",
          "is_voided",
          "is_reversal",
          "is_manual",
          "identifier",
          "is_manual_override",
          "is_posted"
        ],
        "properties": {
          "anchor_id": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dimension_capture": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/JournalDimensionCaptureState"
              }
            ]
          },
          "exchange_rate": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "is_current": {
            "type": "boolean"
          },
          "is_deleted": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "is_locked": {
            "type": "boolean"
          },
          "is_manual": {
            "type": "boolean"
          },
          "is_manual_override": {
            "type": "boolean"
          },
          "is_posted": {
            "type": "boolean"
          },
          "is_reversal": {
            "type": "boolean"
          },
          "is_voided": {
            "type": "boolean"
          },
          "meta_data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          },
          "override_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "prev_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "related_entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "related_entity_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "reversal_of": {
            "type": [
              "string",
              "null"
            ]
          },
          "root_entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "root_entity_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_document_version_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_hash": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "version_number": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "BankingJournalModel": {
        "type": "object",
        "required": [
          "id",
          "anchor_id",
          "date",
          "currency",
          "created_at",
          "is_locked",
          "is_posted",
          "is_voided",
          "is_reversal",
          "is_manual",
          "is_repaired",
          "identifier"
        ],
        "properties": {
          "account": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "account_subtype": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "anchor_id": {
            "type": "string"
          },
          "banking_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "base_currency_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "is_deleted": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "is_locked": {
            "type": "boolean"
          },
          "is_manual": {
            "type": "boolean"
          },
          "is_manual_override": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_posted": {
            "type": "boolean"
          },
          "is_repaired": {
            "type": "boolean",
            "description": "True when this journal was created by the posting-repair tool. Derived\nfrom `meta_data.custom_data.posting_repair`; no dedicated column exists."
          },
          "is_reversal": {
            "type": "boolean"
          },
          "is_voided": {
            "type": "boolean"
          },
          "lines": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/JournalLineItem"
            }
          },
          "override_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "root_entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "root_entity_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_credit_bcy": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_credit_fcy": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_debit_bcy": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_debit_fcy": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "BankingMatchEngineBoostConfig": {
        "type": "object",
        "properties": {
          "amount_aligned": {
            "type": "integer",
            "format": "int32",
            "default": 8
          },
          "counterparty_linked": {
            "type": "integer",
            "format": "int32",
            "default": 3
          },
          "currency_aligned": {
            "type": "integer",
            "format": "int32",
            "default": 4
          },
          "date_aligned": {
            "type": "integer",
            "format": "int32",
            "default": 5
          },
          "description_aligned": {
            "type": "integer",
            "format": "int32",
            "default": 6
          },
          "grouped_selection": {
            "type": "integer",
            "format": "int32",
            "default": 2
          },
          "reference_aligned": {
            "type": "integer",
            "format": "int32",
            "default": 8
          },
          "reference_present": {
            "type": "integer",
            "format": "int32",
            "default": 4
          }
        }
      },
      "BankingMatchEngineConfig": {
        "type": "object",
        "properties": {
          "ai_ready": {
            "type": "boolean",
            "default": true
          },
          "boosts": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BankingMatchEngineBoostConfig"
              }
            ],
            "default": {
              "amount_aligned": 8,
              "counterparty_linked": 3,
              "currency_aligned": 4,
              "date_aligned": 5,
              "description_aligned": 6,
              "grouped_selection": 2,
              "reference_aligned": 8,
              "reference_present": 4
            }
          },
          "profile": {
            "type": "string",
            "default": "balanced"
          },
          "signals": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BankingMatchEngineSignalConfig"
              }
            ],
            "default": {
              "amount_aligned": true,
              "counterparty_linked": true,
              "currency_aligned": true,
              "date_aligned": true,
              "description_aligned": true,
              "grouped_selection": true,
              "reference_aligned": true,
              "reference_present": true
            }
          },
          "thresholds": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BankingMatchEngineThresholdConfig"
              }
            ],
            "default": {
              "amount_tolerance_bps": 250,
              "amount_tolerance_cap_cents": 50,
              "amount_tolerance_floor_cents": 10,
              "base_score_high_confidence_min": 80,
              "date_window_days": 3,
              "description_overlap_pct": 20,
              "refined_score_high_confidence_min": 85,
              "refined_score_medium_confidence_min": 60
            }
          }
        }
      },
      "BankingMatchEngineSignalConfig": {
        "type": "object",
        "properties": {
          "amount_aligned": {
            "type": "boolean",
            "default": true
          },
          "counterparty_linked": {
            "type": "boolean",
            "default": true
          },
          "currency_aligned": {
            "type": "boolean",
            "default": true
          },
          "date_aligned": {
            "type": "boolean",
            "default": true
          },
          "description_aligned": {
            "type": "boolean",
            "default": true
          },
          "grouped_selection": {
            "type": "boolean",
            "default": true
          },
          "reference_aligned": {
            "type": "boolean",
            "default": true
          },
          "reference_present": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "BankingMatchEngineThresholdConfig": {
        "type": "object",
        "properties": {
          "amount_tolerance_bps": {
            "type": "integer",
            "format": "int32",
            "default": 250,
            "minimum": 0
          },
          "amount_tolerance_cap_cents": {
            "type": "integer",
            "format": "int64",
            "default": 50
          },
          "amount_tolerance_floor_cents": {
            "type": "integer",
            "format": "int64",
            "default": 10
          },
          "base_score_high_confidence_min": {
            "type": "integer",
            "format": "int32",
            "default": 80,
            "minimum": 0
          },
          "date_window_days": {
            "type": "integer",
            "format": "int64",
            "default": 3
          },
          "description_overlap_pct": {
            "type": "integer",
            "format": "int32",
            "default": 20,
            "minimum": 0
          },
          "refined_score_high_confidence_min": {
            "type": "integer",
            "format": "int32",
            "default": 85,
            "minimum": 0
          },
          "refined_score_medium_confidence_min": {
            "type": "integer",
            "format": "int32",
            "default": 60,
            "minimum": 0
          }
        }
      },
      "BankingMatchPolicyModel": {
        "type": "object",
        "required": [
          "id",
          "policy_name",
          "is_default",
          "is_active",
          "is_system",
          "ai_ready",
          "config"
        ],
        "properties": {
          "ai_ready": {
            "type": "boolean"
          },
          "config": {
            "$ref": "#/components/schemas/BankingMatchEngineConfig"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_default": {
            "type": "boolean"
          },
          "is_system": {
            "type": "boolean"
          },
          "label_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "policy_name": {
            "type": "string"
          }
        }
      },
      "BankingMatchPolicySettingFormModel": {
        "type": "object",
        "required": [
          "default_policy_id"
        ],
        "properties": {
          "default_policy_id": {
            "type": "string"
          }
        }
      },
      "BankingReconciliationAttachmentModel": {
        "type": "object",
        "required": [
          "id",
          "attachment_name",
          "attachment_type",
          "attachment_size",
          "attachment_url",
          "created_at"
        ],
        "properties": {
          "attachment_name": {
            "type": "string"
          },
          "attachment_size": {
            "type": "integer",
            "format": "int32"
          },
          "attachment_type": {
            "type": "string"
          },
          "attachment_url": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "BankingReconciliationLineModel": {
        "type": "object",
        "required": [
          "id",
          "reconciliation_id",
          "journal_id",
          "journal_line_id",
          "is_reconciled"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "is_reconciled": {
            "type": "boolean"
          },
          "journal_id": {
            "type": "string"
          },
          "journal_line_id": {
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "reconciliation_id": {
            "type": "string"
          }
        }
      },
      "BankingReconciliationModel": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "banking_account_id",
          "start_date",
          "end_date",
          "closing_balance",
          "status",
          "created_at",
          "lines",
          "attachments"
        ],
        "properties": {
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankingReconciliationAttachmentModel"
            }
          },
          "banking_account_id": {
            "type": "string"
          },
          "calculated_balance": {
            "type": [
              "string",
              "null"
            ]
          },
          "closing_balance": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "diff": {
            "type": [
              "string",
              "null"
            ]
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "id": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankingReconciliationLineModel"
            }
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "opening_balance": {
            "type": [
              "string",
              "null"
            ]
          },
          "reconciled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "BankingTransactionEntityMappingModel": {
        "type": "object",
        "required": [
          "id",
          "banking_transaction_id",
          "entity_type",
          "allocated_amount",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "allocated_amount": {
            "type": "string"
          },
          "allocated_amount_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "banking_transaction_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "entity_type": {
            "type": "string"
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "original_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "original_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BankingTransactionModel": {
        "type": "object",
        "required": [
          "id",
          "exchange_rate",
          "banking_account_id",
          "description",
          "amount",
          "transaction_type",
          "available_balance",
          "date"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "available_balance": {
            "type": "string"
          },
          "banking_account_id": {
            "type": "string"
          },
          "company_bank_link_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "credit_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "debit_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "exchange_rate": {
            "type": "string"
          },
          "external_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_transaction_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_auto_matched": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_ignored": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_reconciled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "matches": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/MatchModel"
            }
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_identifier": {
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_type": {
            "type": "string"
          }
        }
      },
      "BulkFullPaymentFromModel": {
        "type": "object",
        "required": [
          "document_ids"
        ],
        "properties": {
          "deposit_account": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "payment_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_mode": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_context": {
            "type": [
              "string",
              "null"
            ],
            "description": "Controls generated references:\n- \"bulk\" => {document_number}-BULK-PAY-001\n- \"import\" => {document_number}-IMP-PAY-001"
          },
          "reference_note": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "BulkFullPaymentResponseModel": {
        "type": "object",
        "required": [
          "success",
          "message",
          "paid_count",
          "skipped_count",
          "failed_count",
          "paid",
          "skipped",
          "failed"
        ],
        "properties": {
          "failed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkFullPaymentRowError"
            }
          },
          "failed_count": {
            "type": "integer",
            "format": "int64"
          },
          "message": {
            "type": "string"
          },
          "paid": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkFullPaymentRowResult"
            }
          },
          "paid_count": {
            "type": "integer",
            "format": "int64"
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkFullPaymentRowResult"
            }
          },
          "skipped_count": {
            "type": "integer",
            "format": "int64"
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "BulkFullPaymentRowError": {
        "type": "object",
        "required": [
          "document_id",
          "error"
        ],
        "properties": {
          "document_id": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        }
      },
      "BulkFullPaymentRowResult": {
        "type": "object",
        "required": [
          "document_id",
          "document_number",
          "reference_number"
        ],
        "properties": {
          "document_id": {
            "type": "string"
          },
          "document_number": {
            "type": "string"
          },
          "reference_number": {
            "type": "string"
          }
        }
      },
      "BulkTransitionFromModel": {
        "type": "object",
        "required": [
          "document_ids"
        ],
        "properties": {
          "document_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "to_state": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "BulkTransitionResponseModel": {
        "type": "object",
        "required": [
          "success",
          "message",
          "transitioned_count",
          "failed_count",
          "transitioned",
          "failed"
        ],
        "properties": {
          "failed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkTransitionRowError"
            }
          },
          "failed_count": {
            "type": "integer",
            "format": "int64"
          },
          "message": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          },
          "transitioned": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkTransitionRowResult"
            }
          },
          "transitioned_count": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "BulkTransitionRowError": {
        "type": "object",
        "required": [
          "document_id",
          "error"
        ],
        "properties": {
          "document_id": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        }
      },
      "BulkTransitionRowResult": {
        "type": "object",
        "required": [
          "document_id",
          "to_state"
        ],
        "properties": {
          "document_id": {
            "type": "string"
          },
          "to_state": {
            "type": "string"
          }
        }
      },
      "CalcDocAdjustmentData": {
        "type": "object",
        "required": [
          "adjustment_description"
        ],
        "properties": {
          "adjustable_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "adjusted_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "adjustment_calc_base": {
            "type": [
              "string",
              "null"
            ]
          },
          "adjustment_calc_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "adjustment_description": {
            "type": "string"
          },
          "adjustment_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "adjustment_type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CalcItemAdjustmentData": {
        "type": "object",
        "properties": {
          "adjustable_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "adjusted_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribute_calc_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribute_cost": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribute_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribute_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribute_type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CalcTaxData": {
        "type": "object",
        "required": [
          "tax_id",
          "item_tax_name",
          "item_tax_display_label",
          "item_tax_rate",
          "item_tax_type",
          "item_taxable_amount",
          "item_tax_amount"
        ],
        "properties": {
          "item_tax_amount": {
            "type": "string"
          },
          "item_tax_display_label": {
            "type": "string"
          },
          "item_tax_name": {
            "type": "string"
          },
          "item_tax_rate": {
            "type": "string"
          },
          "item_tax_type": {
            "type": "string"
          },
          "item_taxable_amount": {
            "type": "string"
          },
          "tax_id": {
            "type": "string"
          }
        }
      },
      "CalculatorResponse": {
        "type": "object",
        "required": [
          "currency",
          "item_row_total",
          "sub_total",
          "calc_tax_data",
          "total_tax",
          "tax_summary",
          "total",
          "doc_adjustment_data",
          "total_adjustment",
          "grand_total",
          "outstanding_amount",
          "calc_item_attributes"
        ],
        "properties": {
          "amount_received": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount_received_withheld": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank_charge": {
            "type": [
              "string",
              "null"
            ]
          },
          "calc_item_attributes": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/CalcItemAdjustmentData"
              }
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "calc_tax_data": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/components/schemas/CalcTaxData"
              },
              "propertyNames": {
                "type": "string"
              }
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "currency": {
            "type": "string"
          },
          "doc_adjustment_data": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/CalcDocAdjustmentData"
              }
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "grand_total": {
            "type": "string"
          },
          "item_row_total": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "late_fee_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "outstanding_amount": {
            "type": "string"
          },
          "sub_total": {
            "type": "string"
          },
          "tax_summary": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/TaxSummary"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "total": {
            "type": "string"
          },
          "total_adjustment": {
            "type": "string"
          },
          "total_amount_received": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_tax": {
            "type": "string"
          }
        }
      },
      "CardData": {
        "type": "object",
        "required": [
          "key",
          "count",
          "sum_by_currency",
          "sum_in_base_currency"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "key": {
            "type": "string"
          },
          "sum_by_currency": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "sum_in_base_currency": {
            "type": "string"
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyAttr": {
        "type": "object",
        "properties": {
          "attribute_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribute_value": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyAttributeDbModel": {
        "type": "object",
        "required": [
          "id",
          "company_id",
          "attribute_label",
          "attribute_value",
          "created_at",
          "is_system_defined"
        ],
        "properties": {
          "attribute_label": {
            "type": "string"
          },
          "attribute_value": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "is_system_defined": {
            "type": "boolean"
          }
        }
      },
      "CompanyBankAccountDbModel": {
        "type": "object",
        "required": [
          "id",
          "company_id",
          "currency_id",
          "bank_account_detail",
          "bank_account_label",
          "is_active",
          "created_at",
          "updated_by"
        ],
        "properties": {
          "bank_account_detail": {
            "type": "string"
          },
          "bank_account_label": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_by": {
            "type": "string"
          }
        }
      },
      "CompanyBankDetailResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CompanyBankAccountDbModel"
              }
            ]
          }
        }
      },
      "CompanyBankFormModel": {
        "type": "object",
        "properties": {
          "bank_account_detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank_account_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "CompanyBankListModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "bank_accounts"
        ],
        "properties": {
          "bank_accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyBankAccountDbModel"
            }
          },
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "CompanyBankListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CompanyBankListModel"
              }
            ]
          }
        }
      },
      "CompanyCompanyStatusUpdateFormModel": {
        "type": "object",
        "properties": {
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyCurrencyAddForm": {
        "type": "object",
        "description": "Appends currencies without replacing existing currencies or their linked FX rates. The tenant comes from authentication. Each currency is validated independently: unknown codes return INVALID_VALUE, already-configured currencies return CURRENCY_ALREADY_ADDED, and repeated codes return DUPLICATE_VALUE. Any validation failure rejects the entire request.",
        "properties": {
          "currency": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CurrencyCode"
            }
          }
        }
      },
      "CompanyCurrencyDeleteResponseModel": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string"
          }
        }
      },
      "CompanyCurrencyFormModel": {
        "type": "object",
        "properties": {
          "currency": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CurrencyCode"
            }
          }
        }
      },
      "CompanyCurrencyListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CompanyCurrencyModel"
            }
          }
        }
      },
      "CompanyCurrencyModel": {
        "type": "object",
        "required": [
          "id",
          "code",
          "name",
          "is_company_default"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_company_default": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "rate_strategy": {
            "$ref": "#/components/schemas/CompanyCurrencyRateStrategy",
            "description": "Enriched after fetch (not a DB column). Defaults to `auto`."
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyCurrencyRateStrategy": {
        "type": "string",
        "description": "How a currency's exchange rate is currently sourced, based on its custom FX windows.",
        "enum": [
          "custom",
          "scheduled",
          "auto"
        ]
      },
      "CompanyDbModel": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "currency_id",
          "locale",
          "company_name",
          "subdomain",
          "timezone",
          "fiscal_year_end_month",
          "fiscal_year_end_day",
          "contact_first_name",
          "contact_last_name",
          "contact_email",
          "contact_phone_number",
          "company_signature",
          "address_street1",
          "address_street2",
          "address_city",
          "address_state",
          "address_zip_code",
          "address_country",
          "is_active",
          "created_at",
          "registration_number",
          "can_extend_trial",
          "partner_id",
          "company_type"
        ],
        "properties": {
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_city": {
            "type": "string"
          },
          "address_country": {
            "type": "string"
          },
          "address_state": {
            "type": "string"
          },
          "address_street1": {
            "type": "string"
          },
          "address_street2": {
            "type": "string"
          },
          "address_zip_code": {
            "type": "string"
          },
          "can_extend_trial": {
            "type": "boolean"
          },
          "company_name": {
            "type": "string"
          },
          "company_signature": {
            "type": "string"
          },
          "company_type": {
            "type": "string"
          },
          "contact_email": {
            "type": "string"
          },
          "contact_first_name": {
            "type": "string"
          },
          "contact_last_name": {
            "type": "string"
          },
          "contact_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_phone_number": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency_id": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fiscal_year_end_day": {
            "type": "integer",
            "format": "int32"
          },
          "fiscal_year_end_month": {
            "type": "integer",
            "format": "int32"
          },
          "has_completed_onboarding": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "locale": {
            "type": "string"
          },
          "logo_data_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "meta_data": {},
          "parent_company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "partner_id": {
            "type": "string"
          },
          "registration_number": {
            "type": "string"
          },
          "subdomain": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "CompanyDeleteResponseModel": {
        "type": "object",
        "required": [
          "delete_company_id"
        ],
        "properties": {
          "delete_company_id": {
            "type": "string"
          }
        }
      },
      "CompanyDetailResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CompanyModelWithAttr"
              }
            ]
          }
        }
      },
      "CompanyEmailTemplateDbModel": {
        "type": "object",
        "required": [
          "id",
          "document_type_id",
          "email_template_type",
          "email_subject",
          "email_body"
        ],
        "properties": {
          "document_type_id": {
            "type": "string"
          },
          "email_body": {
            "type": "string"
          },
          "email_subject": {
            "type": "string"
          },
          "email_template_type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_by": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyEmailTemplateDetailResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CompanyEmailTemplateDbModel"
              }
            ]
          }
        }
      },
      "CompanyEmailTemplateFormModel": {
        "type": "object",
        "properties": {
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "subject": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyEmailTemplateListModel": {
        "type": "object",
        "required": [
          "email_templates"
        ],
        "properties": {
          "email_templates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyEmailTemplateDbModel"
            }
          }
        }
      },
      "CompanyEmailTemplateListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CompanyEmailTemplateListModel"
              }
            ]
          }
        }
      },
      "CompanyFormModel": {
        "type": "object",
        "required": [
          "company_name",
          "company_signature"
        ],
        "properties": {
          "address_city": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_street1": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_street2": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_zip_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_attribute": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CompanyAttr"
            }
          },
          "company_name": {
            "type": "string"
          },
          "company_signature": {
            "type": "string"
          },
          "company_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_phone_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "fiscal_year_end_day": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "fiscal_year_end_month": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ]
          },
          "partner_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyFormResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CompanyDbModel"
          },
          "user_acl_company_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyFxRateCreateForm": {
        "type": "object",
        "description": "Create a custom FX window. `company_id`/`base_currency`/`created_by` are derived\nserver-side from the auth context and company profile — never client-supplied.",
        "properties": {
          "effective_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "`YYYY-MM-DD` in the company timezone; defaults to the company's today."
          },
          "effective_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "`YYYY-MM-DD` in the company timezone (inclusive); `null` = open-ended."
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ],
            "description": "`1 target_currency = exchange_rate company-base`; positive, up to 6 decimal places.",
            "example": "0.716020"
          },
          "replace_open_ended": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When the new window starts inside an existing *open-ended* window for the same\ncurrency, end that window the day before the new start (or retire it if it starts\nthe same day) instead of rejecting with `OVERLAPPING_FX_WINDOW`. Any other overlap\nis still rejected. Defaults to `false` so replacement is always an explicit choice."
          },
          "target_currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 4217 code of a currency already added to the company.",
            "example": "AUD"
          }
        }
      },
      "CompanyFxRateDeleteResponseModel": {
        "type": "object",
        "required": [
          "id",
          "outcome"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/CompanyFxRateRemovalOutcome"
          }
        }
      },
      "CompanyFxRateHistoryEntry": {
        "type": "object",
        "description": "One entry of the custom FX change history (from the activity log). Dates are\ncompany-local `YYYY-MM-DD`; `*_before` are `null` on creation.",
        "required": [
          "id",
          "action",
          "user_id",
          "created_at"
        ],
        "properties": {
          "action": {
            "type": "string",
            "description": "`created` | `updated` | `ended` | `deleted`.",
            "enum": [
              "created",
              "updated",
              "ended",
              "deleted"
            ]
          },
          "base_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "When the change was made (RFC 3339)."
          },
          "effective_from_after": {
            "type": [
              "string",
              "null"
            ]
          },
          "effective_from_before": {
            "type": [
              "string",
              "null"
            ]
          },
          "effective_to_after": {
            "type": [
              "string",
              "null"
            ]
          },
          "effective_to_before": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate_after": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate_before": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "description": "Activity row id."
          },
          "rate_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Custom FX window the change applies to."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why a secondary window changed: `replaced` | `switch_automatic`; `null` otherwise.",
            "enum": [
              "replaced",
              "switch_automatic",
              null
            ]
          },
          "target_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "string",
            "description": "Actor user id."
          }
        }
      },
      "CompanyFxRateHistoryResponseModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_number",
          "page_size",
          "entries"
        ],
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyFxRateHistoryEntry"
            }
          },
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "CompanyFxRateListResponseModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_number",
          "page_size",
          "rates"
        ],
        "properties": {
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyFxRateModel"
            }
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "CompanyFxRateModel": {
        "type": "object",
        "description": "One custom FX window row. Scalars are stringified for stable wire/UI parsing\n(decimals keep full precision; timestamps are UTC ISO-8601).\n\nRate direction: `1 target_currency = exchange_rate base_currency`, where\n`base_currency` is the company's base currency. This is the same convention as a\ndocument's `document_exchange_rate` (\"1 document currency = X company currency\").",
        "required": [
          "id",
          "base_currency",
          "target_currency",
          "exchange_rate",
          "status",
          "effective_from",
          "effective_from_date",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "base_currency": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "effective_from": {
            "type": "string",
            "description": "First instant the window applies (UTC). Start of `effective_from_date` in the\ncompany timezone."
          },
          "effective_from_date": {
            "type": "string",
            "description": "Company-local calendar date the window starts (`YYYY-MM-DD`). UIs should display\nand edit this, not a slice of the UTC timestamp (which can be the previous day)."
          },
          "effective_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last instant the window applies (UTC, inclusive). `null` = open-ended."
          },
          "effective_to_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Company-local calendar date the window ends, inclusive (`YYYY-MM-DD`)."
          },
          "exchange_rate": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/CompanyFxRateStatus"
          },
          "target_currency": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "updated_by": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyFxRateRemovalOutcome": {
        "type": "string",
        "description": "What a removal did to a window.",
        "enum": [
          "deleted",
          "ended",
          "already_deleted"
        ]
      },
      "CompanyFxRateStatus": {
        "type": "string",
        "description": "Derived lifecycle state of a custom FX window. Never stored — computed from\n`effective_from` / `effective_to` against the server clock (UTC).",
        "enum": [
          "current",
          "upcoming",
          "expired"
        ]
      },
      "CompanyFxRateSwitchAutomaticResponseModel": {
        "type": "object",
        "description": "Response for `switch-automatic`: what happened to the pair's current/upcoming windows.",
        "required": [
          "target_currency",
          "removed_ids",
          "ended_ids"
        ],
        "properties": {
          "ended_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Windows that were in effect before today and now end yesterday."
          },
          "removed_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Soft-deleted windows (upcoming, or started today)."
          },
          "target_currency": {
            "type": "string"
          }
        }
      },
      "CompanyFxRateUpdateForm": {
        "type": "object",
        "description": "Edit a custom FX window. Only the rate/window is editable; identity + base are fixed.",
        "properties": {
          "effective_from": {
            "type": [
              "string",
              "null"
            ],
            "description": "`YYYY-MM-DD` (company timezone); omit to keep the existing start. The start of a\nwindow that is already in effect cannot move (it may have priced documents)."
          },
          "effective_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "`YYYY-MM-DD` (company timezone, inclusive); empty string clears (open-ended),\nomit to keep existing."
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ],
            "description": "Positive, up to 6 decimal places."
          }
        }
      },
      "CompanyListModel": {
        "type": "object",
        "required": [
          "id",
          "company_name",
          "contact_email",
          "currency_id",
          "locale",
          "created_at"
        ],
        "properties": {
          "company_name": {
            "type": "string"
          },
          "contact_email": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CompanyListModel"
            }
          }
        }
      },
      "CompanyLogoDataUrlForm": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "data_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyLogoDataUrlResponseModel": {
        "type": "object",
        "required": [
          "logo_url"
        ],
        "properties": {
          "logo_url": {
            "type": "string"
          }
        }
      },
      "CompanyMappingDetailResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object"
          }
        }
      },
      "CompanyMappingListModel": {
        "type": "object",
        "required": [
          "id",
          "sender_company_id",
          "company_name"
        ],
        "properties": {
          "accepted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "company_name": {
            "type": "string"
          },
          "connected_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "connection_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "rejected_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "sender_company_id": {
            "type": "string"
          }
        }
      },
      "CompanyMappingListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CompanyMappingListModel"
            }
          }
        }
      },
      "CompanyModelWithAttr": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "currency_id",
          "locale",
          "company_name",
          "timezone",
          "fiscal_year_end_month",
          "fiscal_year_end_day",
          "contact_first_name",
          "contact_last_name",
          "contact_email",
          "contact_phone_number",
          "company_signature",
          "address_street1",
          "address_street2",
          "address_city",
          "address_state",
          "address_zip_code",
          "address_country",
          "created_at",
          "can_extend_trial",
          "company_type"
        ],
        "properties": {
          "address_city": {
            "type": "string"
          },
          "address_country": {
            "type": "string"
          },
          "address_state": {
            "type": "string"
          },
          "address_street1": {
            "type": "string"
          },
          "address_street2": {
            "type": "string"
          },
          "address_zip_code": {
            "type": "string"
          },
          "can_extend_trial": {
            "type": "boolean"
          },
          "company_attribute": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CompanyAttributeDbModel"
            }
          },
          "company_name": {
            "type": "string"
          },
          "company_signature": {
            "type": "string"
          },
          "company_type": {
            "type": "string"
          },
          "contact_email": {
            "type": "string"
          },
          "contact_first_name": {
            "type": "string"
          },
          "contact_last_name": {
            "type": "string"
          },
          "contact_phone_number": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency_id": {
            "type": "string"
          },
          "fiscal_year_end_day": {
            "type": "integer",
            "format": "int32"
          },
          "fiscal_year_end_month": {
            "type": "integer",
            "format": "int32"
          },
          "id": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "logo_data_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "meta_data": {},
          "parent_company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "subscription": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SubscriptionCompanyModel"
              }
            ]
          },
          "timezone": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "CompanyPaymentGatewayDeleteModel": {
        "type": "object",
        "required": [
          "deleted"
        ],
        "properties": {
          "deleted": {
            "$ref": "#/components/schemas/DeleteModel"
          }
        }
      },
      "CompanyPaymentGatewayDetailResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object"
          }
        }
      },
      "CompanyPaymentGatewayFormModel": {
        "type": "object",
        "properties": {
          "credentials": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "payment_gateway_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyPaymentGatewayListResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object"
          }
        }
      },
      "CompanyPaymentModeDbModel": {
        "type": "object",
        "required": [
          "id",
          "label"
        ],
        "properties": {
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "CompanyPaymentModeDetailResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CompanyPaymentModeDbModel"
              }
            ]
          }
        }
      },
      "CompanyPaymentModeFormModel": {
        "type": "object",
        "properties": {
          "label": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompanyPaymentModeListModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "payment_mode"
        ],
        "properties": {
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "payment_mode": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyPaymentModeDbModel"
            }
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "CompanyPaymentModeListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CompanyPaymentModeListModel"
              }
            ]
          }
        }
      },
      "CompanyPaymentTermDetailResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CompanyPaymentTermModel"
              }
            ]
          }
        }
      },
      "CompanyPaymentTermFormModel": {
        "type": "object",
        "properties": {
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        }
      },
      "CompanyPaymentTermListModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "payment_term"
        ],
        "properties": {
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "payment_term": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyPaymentTermModel"
            }
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "CompanyPaymentTermListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CompanyPaymentTermListModel"
              }
            ]
          }
        }
      },
      "CompanyPaymentTermModel": {
        "type": "object",
        "required": [
          "id",
          "label",
          "value",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "value": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "CompanyStripConnectFormModel": {
        "type": "object"
      },
      "CompanyUpdateResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CompanyDbModel"
              }
            ]
          }
        }
      },
      "CountryListModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CountryWithLocaleTimezone"
            }
          }
        }
      },
      "CountryWithLocaleTimezone": {
        "type": "object",
        "required": [
          "code",
          "name",
          "currency_code",
          "currency_name"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "currency_code": {
            "type": "string"
          },
          "currency_name": {
            "type": "string"
          },
          "locales": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/LocaleModel"
            }
          },
          "name": {
            "type": "string"
          },
          "timezones": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/TimezoneModel"
            }
          }
        }
      },
      "CreateAppClientFormModel": {
        "type": "object",
        "required": [
          "app_name",
          "permissions"
        ],
        "properties": {
          "app_name": {
            "type": "string"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateDimensionRequest": {
        "type": "object",
        "required": [
          "code",
          "name",
          "scopes"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DimensionScope"
            }
          }
        },
        "additionalProperties": false
      },
      "CreateDimensionValueRequest": {
        "type": "object",
        "required": [
          "code",
          "name"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_group": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "parent_value_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "CreateEndpointRequest": {
        "type": "object",
        "required": [
          "url",
          "enabled_events"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled_events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomHeaderInput"
            }
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "spec_version": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "CreditNoteFromModel": {
        "type": "object",
        "properties": {
          "amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "anchor_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Currency": {
        "type": "object",
        "required": [
          "code",
          "name"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CurrencyCode": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CurrencyListModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            }
          }
        }
      },
      "CurrencyStatement": {
        "type": "object",
        "required": [
          "currency",
          "opening_balance",
          "total_debits",
          "total_credits",
          "closing_balance",
          "entries"
        ],
        "properties": {
          "closing_balance": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatementEntry"
            }
          },
          "opening_balance": {
            "type": "string"
          },
          "total_credits": {
            "type": "string"
          },
          "total_debits": {
            "type": "string"
          }
        }
      },
      "CursorActivityModel": {
        "type": "object",
        "required": [
          "id",
          "acl_module_id",
          "user_id",
          "activity",
          "created_at"
        ],
        "properties": {
          "acl_module_id": {
            "type": "string"
          },
          "activity": {
            "type": "string"
          },
          "activity_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "actor_source": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ActivityActorSourceModel"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "message_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "message_params": {},
          "user_id": {
            "type": "string"
          }
        }
      },
      "CursorPagination": {
        "type": "object",
        "required": [
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CustomHeaderInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DataExportCreateRequest": {
        "type": "object",
        "properties": {
          "format": {
            "$ref": "#/components/schemas/DataExportFormatRequest"
          }
        }
      },
      "DataExportDownloadResponse": {
        "type": "object",
        "required": [
          "url",
          "expires_at"
        ],
        "properties": {
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "DataExportFormatRequest": {
        "type": "string",
        "enum": [
          "CSV",
          "JSON"
        ]
      },
      "DataExportListResponse": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "has_active_export",
          "next_request_at_by_format",
          "exports"
        ],
        "properties": {
          "exports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataExportResponse"
            }
          },
          "has_active_export": {
            "type": "boolean"
          },
          "next_request_at_by_format": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "format": "date-time"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "DataExportProgress": {
        "type": "object",
        "required": [
          "completed",
          "total"
        ],
        "properties": {
          "completed": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "DataExportResponse": {
        "type": "object",
        "required": [
          "id",
          "requested_by",
          "status",
          "format",
          "schema_version",
          "requested_at",
          "notification_status",
          "progress"
        ],
        "properties": {
          "archive_size_bytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "failed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "format": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "notification_status": {
            "type": "string"
          },
          "processing_started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "progress": {
            "$ref": "#/components/schemas/DataExportProgress"
          },
          "ready_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "requested_by": {
            "type": "string"
          },
          "schema_version": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "DataResponse_DefaultsLookupResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DefaultsLookupItem"
                },
                "description": "One entry per requested id, in request order. Empty while Dimensions is not activated."
              }
            }
          }
        }
      },
      "DataResponse_Dimension": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "code",
              "name",
              "scopes",
              "is_archived",
              "can_restore_default_label",
              "value_counts"
            ],
            "properties": {
              "can_restore_default_label": {
                "type": "boolean"
              },
              "code": {
                "type": "string"
              },
              "default_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "is_archived": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DimensionScope"
                }
              },
              "template_key": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "value_counts": {
                "$ref": "#/components/schemas/ValueCounts"
              },
              "values": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/components/schemas/DimensionValue"
                },
                "description": "Present only when the list was asked for `include=values`: every value of this dimension that\nmatches the requested status, in the same order and with the same shape as the values list."
              }
            }
          }
        }
      },
      "DataResponse_DimensionCorrectionResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "record_id",
              "lines_changed",
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DimensionCorrectionItem"
                },
                "description": "Every line of the record with its resulting values."
              },
              "lines_changed": {
                "type": "integer",
                "format": "int32",
                "description": "Lines whose set of values changed; 0 means nothing was written.",
                "minimum": 0
              },
              "record_id": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version_number": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              }
            }
          }
        }
      },
      "DataResponse_DimensionIncomeStatement": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "dimension_id",
              "dimension_name",
              "date_from",
              "date_to",
              "buckets",
              "accounts"
            ],
            "properties": {
              "accounts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DimensionIncomeAccount"
                }
              },
              "buckets": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DimensionIncomeBucket"
                },
                "description": "Grouped mode: values with activity, ordered by code. Empty in drill-down mode."
              },
              "date_from": {
                "type": "string"
              },
              "date_to": {
                "type": "string"
              },
              "dimension_id": {
                "type": "string"
              },
              "dimension_name": {
                "type": "string"
              },
              "selection": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DimensionAmounts",
                    "description": "Drill-down mode: the selection's amounts and its accounts, ordered by account name."
                  }
                ]
              },
              "totals": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DimensionAmounts",
                    "description": "Grouped mode: direct buckets plus Unassigned. Equals the unfiltered income statement."
                  }
                ]
              },
              "unassigned": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DimensionAmounts",
                    "description": "Grouped mode: lines with no value for the dimension."
                  }
                ]
              }
            }
          }
        }
      },
      "DataResponse_DimensionValue": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "dimension_id",
              "code",
              "name",
              "path",
              "is_group",
              "is_archived",
              "can_restore_default_label"
            ],
            "properties": {
              "can_restore_default_label": {
                "type": "boolean"
              },
              "code": {
                "type": "string"
              },
              "default_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dimension_id": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "is_archived": {
                "type": "boolean"
              },
              "is_group": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "parent": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ValuePathEntry"
                  }
                ]
              },
              "parent_value_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "path": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ValuePathEntry"
                }
              },
              "template_key": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "DataResponse_DimensionWorklistSummary": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "records",
              "by_type",
              "by_dimension"
            ],
            "properties": {
              "by_dimension": {
                "type": "object",
                "description": "Records with at least one line missing a value, per dimension id.",
                "additionalProperties": {
                  "type": "integer",
                  "format": "int64",
                  "minimum": 0
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "by_type": {
                "type": "object",
                "description": "Records needing a value per record type (`invoice`, `bill`, `credit-note`, `expense`, `journal`).",
                "additionalProperties": {
                  "type": "integer",
                  "format": "int64",
                  "minimum": 0
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "records": {
                "type": "integer",
                "format": "int64",
                "description": "Records needing a value, across every record type.",
                "minimum": 0
              }
            }
          }
        }
      },
      "DataResponse_InitializeDimensionsResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "initialized",
              "created"
            ],
            "properties": {
              "created": {
                "type": "boolean"
              },
              "initialized": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "DataResponse_Page_Dimension": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "items",
              "pagination"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "code",
                    "name",
                    "scopes",
                    "is_archived",
                    "can_restore_default_label",
                    "value_counts"
                  ],
                  "properties": {
                    "can_restore_default_label": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string"
                    },
                    "default_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "type": "string"
                    },
                    "is_archived": {
                      "type": "boolean"
                    },
                    "name": {
                      "type": "string"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DimensionScope"
                      }
                    },
                    "template_key": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "value_counts": {
                      "$ref": "#/components/schemas/ValueCounts"
                    },
                    "values": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "$ref": "#/components/schemas/DimensionValue"
                      },
                      "description": "Present only when the list was asked for `include=values`: every value of this dimension that\nmatches the requested status, in the same order and with the same shape as the values list."
                    }
                  }
                }
              },
              "pagination": {
                "$ref": "#/components/schemas/CursorPagination"
              }
            }
          }
        }
      },
      "DataResponse_Page_DimensionAccountLine": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "items",
              "pagination"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "line_id",
                    "journal_id",
                    "journal_anchor_id",
                    "journal_version_number",
                    "identifier",
                    "date",
                    "entry_type",
                    "amount"
                  ],
                  "properties": {
                    "amount": {
                      "type": "string",
                      "description": "Company base currency, always positive; see `entry_type`."
                    },
                    "date": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "entry_type": {
                      "type": "string",
                      "description": "`debit` or `credit`."
                    },
                    "identifier": {
                      "type": "string"
                    },
                    "journal_anchor_id": {
                      "type": "string"
                    },
                    "journal_id": {
                      "type": "string"
                    },
                    "journal_version_number": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "line_id": {
                      "type": "string"
                    },
                    "source_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "source_type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Owning source (`invoice`, `bill`, `expense`, ...) when the journal is system posted."
                    },
                    "value": {
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "$ref": "#/components/schemas/DimensionLineValue",
                          "description": "Absent when the line has no value for the dimension."
                        }
                      ]
                    }
                  }
                }
              },
              "pagination": {
                "$ref": "#/components/schemas/CursorPagination"
              }
            }
          }
        }
      },
      "DataResponse_Page_DimensionValue": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "items",
              "pagination"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "dimension_id",
                    "code",
                    "name",
                    "path",
                    "is_group",
                    "is_archived",
                    "can_restore_default_label"
                  ],
                  "properties": {
                    "can_restore_default_label": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string"
                    },
                    "default_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "dimension_id": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "is_archived": {
                      "type": "boolean"
                    },
                    "is_group": {
                      "type": "boolean"
                    },
                    "name": {
                      "type": "string"
                    },
                    "parent": {
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "$ref": "#/components/schemas/ValuePathEntry"
                        }
                      ]
                    },
                    "parent_value_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "path": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ValuePathEntry"
                      }
                    },
                    "template_key": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "pagination": {
                "$ref": "#/components/schemas/CursorPagination"
              }
            }
          }
        }
      },
      "DataResponse_Page_DimensionWorklistItem": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "items",
              "pagination"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "record_id",
                    "module",
                    "record_type",
                    "number",
                    "date",
                    "status",
                    "lines_missing",
                    "lines_total",
                    "missing_by_dimension",
                    "editable"
                  ],
                  "properties": {
                    "amount": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why `editable` is false (for example `reconciled`)."
                    },
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "date": {
                      "type": "string"
                    },
                    "editable": {
                      "type": "boolean"
                    },
                    "lines_missing": {
                      "type": "integer",
                      "format": "int32",
                      "description": "Taggable revenue/expense lines still missing a value for at least one requested dimension.",
                      "minimum": 0
                    },
                    "lines_total": {
                      "type": "integer",
                      "format": "int32",
                      "description": "All taggable revenue/expense lines of the record.",
                      "minimum": 0
                    },
                    "lock": {
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "$ref": "#/components/schemas/DimensionWorklistLock"
                        }
                      ]
                    },
                    "missing_by_dimension": {
                      "type": "object",
                      "description": "Lines missing a value, per requested dimension id.",
                      "additionalProperties": {
                        "type": "integer",
                        "format": "int32",
                        "minimum": 0
                      },
                      "propertyNames": {
                        "type": "string"
                      }
                    },
                    "module": {
                      "type": "string"
                    },
                    "number": {
                      "type": "string"
                    },
                    "party_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The contact, or the expense note / journal description where there is none."
                    },
                    "record_id": {
                      "type": "string",
                      "description": "Document `anchor_id`, expense id, or manual journal `anchor_id`."
                    },
                    "record_type": {
                      "type": "string",
                      "description": "`invoice`, `bill`, `credit-note`, `expense` or `journal`."
                    },
                    "status": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Concurrency token for expenses (an expense has no version number)."
                    },
                    "version_number": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int32",
                      "description": "Concurrency token for documents and journals, sent back as `expected_version`."
                    }
                  }
                }
              },
              "pagination": {
                "$ref": "#/components/schemas/CursorPagination"
              }
            }
          }
        }
      },
      "DefaultsLookupItem": {
        "type": "object",
        "required": [
          "id",
          "dimension_state"
        ],
        "properties": {
          "dimension_state": {
            "$ref": "#/components/schemas/DimensionState",
            "description": "Empty `resolved` when the record has no defaults, or is not one of this tenant's records of\nthe asked type: the answer does not tell the two apart."
          },
          "id": {
            "type": "string"
          }
        }
      },
      "DefaultsLookupRequest": {
        "type": "object",
        "description": "Only `ids` is read. Duplicates are answered once.",
        "required": [
          "ids"
        ],
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DeleteModel": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string"
          }
        }
      },
      "DeleteStripeConnectAccountResponse": {
        "type": "object",
        "required": [
          "deleted"
        ],
        "properties": {
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "DeliveryRequestHeader": {
        "type": "object",
        "required": [
          "name",
          "value",
          "redacted"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "redacted": {
            "type": "boolean"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "DeliveryRequestSnapshot": {
        "type": "object",
        "required": [
          "method",
          "url",
          "headers"
        ],
        "properties": {
          "headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryRequestHeader"
            }
          },
          "method": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "DeliveryResponse": {
        "type": "object",
        "required": [
          "id",
          "event_id",
          "event_type",
          "status",
          "attempt_number",
          "created_at"
        ],
        "properties": {
          "attempt_number": {
            "type": "integer",
            "format": "int64"
          },
          "attempted_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_id": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "http_status": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "id": {
            "type": "string"
          },
          "next_attempt_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Scheduled retry time when this attempt failed retryably."
          },
          "payload": {
            "type": [
              "string",
              "null"
            ],
            "description": "Exact serialized request body signed and sent for this event."
          },
          "request": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DeliveryRequestSnapshot",
                "description": "Request metadata captured at send time. Secret-bearing values are redacted."
              }
            ]
          },
          "response_excerpt": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "succeeded_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DimensionAmounts": {
        "type": "object",
        "description": "Revenue is credit minus debit, expense is debit minus credit, both in company base currency.",
        "required": [
          "revenue",
          "expense",
          "net_income"
        ],
        "properties": {
          "expense": {
            "type": "string"
          },
          "net_income": {
            "type": "string"
          },
          "revenue": {
            "type": "string"
          }
        }
      },
      "DimensionCorrectionItem": {
        "type": "object",
        "required": [
          "line_id",
          "dimension_state"
        ],
        "properties": {
          "dimension_state": {
            "$ref": "#/components/schemas/DimensionState"
          },
          "line_id": {
            "type": "string"
          }
        }
      },
      "DimensionCorrectionLine": {
        "type": "object",
        "description": "One line of a dimension-only correction: the line's complete set of values (`[]` clears it).",
        "required": [
          "id",
          "dimension_values"
        ],
        "properties": {
          "dimension_values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DimensionValueRef"
            }
          },
          "id": {
            "type": "string",
            "description": "The line's current id (document item id, expense item id, journal line id)."
          }
        },
        "additionalProperties": false
      },
      "DimensionCorrectionRequest": {
        "type": "object",
        "description": "Changes line values and nothing else. Only the fields below are read; anything else in the body is\nignored, so amounts, accounts, taxes and dates cannot move through it.",
        "required": [
          "lines"
        ],
        "properties": {
          "expected_updated_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Concurrency token for expenses: the expense's `updated_at` as listed (null when never updated)."
          },
          "expected_version": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Concurrency token for documents and journals: the record's current `version_number`."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DimensionCorrectionLine"
            },
            "description": "At most 100 lines. A line not listed keeps its values."
          }
        }
      },
      "DimensionInclude": {
        "type": "string",
        "enum": [
          "values"
        ]
      },
      "DimensionIncomeAccount": {
        "type": "object",
        "required": [
          "account_id",
          "account_name",
          "account_code",
          "account_type",
          "amount"
        ],
        "properties": {
          "account_code": {
            "type": "string"
          },
          "account_id": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "account_type": {
            "type": "string",
            "description": "`revenue` or `expense`."
          },
          "amount": {
            "type": "string"
          }
        }
      },
      "DimensionIncomeBucket": {
        "type": "object",
        "required": [
          "value_id",
          "code",
          "name",
          "is_archived",
          "direct",
          "inclusive"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "direct": {
            "$ref": "#/components/schemas/DimensionAmounts",
            "description": "Lines tagged with exactly this value."
          },
          "inclusive": {
            "$ref": "#/components/schemas/DimensionAmounts",
            "description": "This value plus every descendant. Never add inclusive amounts across buckets."
          },
          "is_archived": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "parent_value_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "value_id": {
            "type": "string"
          }
        }
      },
      "DimensionLineKey": {
        "type": "object",
        "required": [
          "source_line_id"
        ],
        "properties": {
          "client_line_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_line_id": {
            "type": "string"
          }
        }
      },
      "DimensionLineValue": {
        "type": "object",
        "required": [
          "value_id",
          "code",
          "name"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value_id": {
            "type": "string"
          }
        }
      },
      "DimensionScope": {
        "type": "string",
        "enum": [
          "contacts",
          "items",
          "transactions"
        ]
      },
      "DimensionState": {
        "type": "object",
        "required": [
          "resolved"
        ],
        "properties": {
          "resolved": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResolvedDimension"
            },
            "description": "One entry per dimension that has a value; dimensions without a value are absent."
          }
        }
      },
      "DimensionStatus": {
        "type": "string",
        "enum": [
          "active",
          "archived",
          "all"
        ]
      },
      "DimensionValue": {
        "type": "object",
        "required": [
          "id",
          "dimension_id",
          "code",
          "name",
          "path",
          "is_group",
          "is_archived",
          "can_restore_default_label"
        ],
        "properties": {
          "can_restore_default_label": {
            "type": "boolean"
          },
          "code": {
            "type": "string"
          },
          "default_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dimension_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_archived": {
            "type": "boolean"
          },
          "is_group": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "parent": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ValuePathEntry"
              }
            ]
          },
          "parent_value_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValuePathEntry"
            }
          },
          "template_key": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DimensionValueRef": {
        "type": "object",
        "description": "One dimension value on a line or on a contact/item default. A line (or default) carries a\nlist of these under `dimension_values`: when the field is present the list is the line's\ncomplete set, so any saved value that is not in it is removed, and an empty list clears the\nline. When the field is absent the saved values are untouched (the same rule custom fields\nfollow). A dimension with no value has no entry; there is no placeholder for \"unassigned\".",
        "required": [
          "dimension_id",
          "value_id"
        ],
        "properties": {
          "dimension_id": {
            "type": "string",
            "description": "A blank id is reported on this field (`..._dimension_values_0_dimension_id`)."
          },
          "value_id": {
            "type": "string",
            "description": "A dimension added without choosing a value is reported on this field\n(`..._dimension_values_0_value_id`), next to the form's other errors."
          }
        },
        "additionalProperties": false
      },
      "DimensionWorklistLock": {
        "type": "object",
        "description": "The Transaction Lock that covers a record's date, judged for the calling user by the same rule\nthe save uses. Absent when no lock covers it.",
        "required": [
          "level",
          "label",
          "from_date"
        ],
        "properties": {
          "from_date": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "level": {
            "type": "string",
            "description": "`hard` (nobody can save), `blocked` (a soft lock this user cannot bypass) or `soft` (the\nuser may bypass it: the save goes through and governance logs the bypass)."
          },
          "to_date": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DocModel": {
        "type": "object",
        "required": [
          "id",
          "anchor_id",
          "version_number",
          "people_id",
          "company_id",
          "currency",
          "document_number",
          "document_type_id",
          "document_issue_date",
          "document_gross_total",
          "document_net_balance",
          "created_at",
          "is_recurring"
        ],
        "properties": {
          "anchor_id": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "document_due_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "document_gross_total": {
            "type": "string"
          },
          "document_issue_date": {
            "type": "string",
            "format": "date"
          },
          "document_net_balance": {
            "type": "string"
          },
          "document_number": {
            "type": "string"
          },
          "document_state": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "document_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_type_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_recurring": {
            "type": "boolean"
          },
          "people_id": {
            "type": "string"
          },
          "recurring_document_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "sender_company": {
            "type": [
              "string",
              "null"
            ]
          },
          "version_number": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DocumentAdjustment": {
        "type": "object",
        "properties": {
          "adjustment_calc_base": {
            "type": [
              "string",
              "null"
            ]
          },
          "adjustment_calc_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "adjustment_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "adjustment_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "adjustment_type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DocumentAdjustmentWrapper": {
        "type": "object",
        "properties": {
          "subtotal": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DocumentAdjustment"
            }
          },
          "total": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DocumentAdjustment"
            }
          }
        }
      },
      "DocumentAttr": {
        "type": "object",
        "properties": {
          "attribute_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribute_value": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DocumentAttrFormModel": {
        "type": "object",
        "required": [
          "attribute"
        ],
        "properties": {
          "attribute": {
            "$ref": "#/components/schemas/DocumentAttributeEnum"
          },
          "docs": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "example": [
              "doc_123",
              "doc_456"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "example": "Quarterly audit cleanup"
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "example": "archive"
          }
        }
      },
      "DocumentAttrFormResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "DocumentAttributeEnum": {
        "type": "string",
        "enum": [
          "state",
          "late_fee",
          "reference_number",
          "notes",
          "terms",
          "due_date"
        ]
      },
      "DocumentCommentFormModel": {
        "type": "object",
        "properties": {
          "anchor_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "comment": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_type_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_internal": {
            "type": "boolean"
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DocumentContact": {
        "type": "object",
        "required": [
          "people_contact_id"
        ],
        "properties": {
          "people_contact_id": {
            "type": "string"
          }
        }
      },
      "DocumentEmailModel": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "user_company_id",
          "document_id",
          "document_type_id",
          "email_template_type",
          "subject",
          "body",
          "from",
          "to",
          "is_pdf_attached",
          "status",
          "created_at",
          "anchor_id"
        ],
        "properties": {
          "anchor_id": {
            "type": "string"
          },
          "bcc": {
            "type": [
              "string",
              "null"
            ]
          },
          "body": {
            "type": "string"
          },
          "cc": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "document_id": {
            "type": "string"
          },
          "document_type_id": {
            "type": "string"
          },
          "email_template_type": {
            "type": "string"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "from": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_pdf_attached": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "user_company_id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "DocumentFormAttributeModel": {
        "type": "object",
        "properties": {
          "attribute_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribute_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "show_in_form": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "DocumentFormModel": {
        "type": "object",
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_adjustment": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DocumentAdjustmentWrapper"
              }
            ]
          },
          "document_attachment": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/AttachmentModel"
            }
          },
          "document_attribute": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DocumentAttr"
            }
          },
          "document_contact": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DocumentContact"
            }
          },
          "document_delivery_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "document_due_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "document_exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_issue_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_number": {
            "type": [
              "string",
              "null"
            ],
            "example": "INV-00042"
          },
          "document_payment_method": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DocumentPaymentMethod"
            }
          },
          "document_po_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_schedule_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "document_shipping_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-id pair set by the document import path. Public\nPOST/PUT writers leave both None. The bulk document handler\nwill convert its per-row\n`BulkDocumentFormModel.external_id` / `external_source` onto\nthis field so `DocumentCreateService::create` can persist them\nalongside the rest of the document — and the\n`uq_document_external_id` partial unique index catches re-syncs\nof the same provider document id within a document type."
          },
          "external_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_partial_payment_allowed": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_recurring": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "items": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DocumentItemFormModel"
            }
          },
          "late_fee_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "late_fee_term": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "meta_data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          },
          "min_payment_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_gateway_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "people_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "recurrence_days": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "recurring_delivery_instruction": {
            "type": [
              "string",
              "null"
            ]
          },
          "recurring_document_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "recurring_end_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "recurring_start_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "template_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "version_number": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": 1
          }
        }
      },
      "DocumentFormResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DocumentModel"
          }
        }
      },
      "DocumentItemAttr": {
        "type": "object",
        "properties": {
          "item_attribute_calc_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_attribute_cost": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_attribute_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_attribute_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_attribute_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "optional_field_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DocumentItemFormModel": {
        "type": "object",
        "properties": {
          "banking_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "client_line_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "dimension_values": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DimensionValueRef"
            }
          },
          "expense_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_attribute": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DocumentItemAttr"
            }
          },
          "item_cost": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_discount_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_discount_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_quantity": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_tax": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DocumentItemTax"
            }
          },
          "item_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "time_sheet_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DocumentItemTax": {
        "type": "object",
        "properties": {
          "item_tax_position": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DocumentMailFromModel": {
        "type": "object",
        "properties": {
          "attachment": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "bcc": {
            "type": [
              "string",
              "null"
            ]
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "cc": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_template_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_pdf_attached": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "subject": {
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DocumentMailFromResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DocumentEmailModel"
          }
        }
      },
      "DocumentMetaData": {
        "type": "object",
        "properties": {
          "anchor_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "doc_type_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "language": {
            "type": [
              "string",
              "null"
            ]
          },
          "style": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DocumentModel": {
        "type": "object",
        "required": [
          "id",
          "document_type_id",
          "user_id",
          "company_id",
          "currency",
          "people_id",
          "template_id",
          "document_status",
          "document_number_sequence",
          "document_number",
          "document_issue_date",
          "document_sub_total",
          "document_total",
          "document_net_balance",
          "document_gross_total",
          "created_at",
          "document_exchange_rate",
          "is_partial_payment_allowed",
          "is_recurring",
          "is_accrual",
          "anchor_id",
          "document_version_id",
          "version_number",
          "is_current"
        ],
        "properties": {
          "anchor_id": {
            "type": "string"
          },
          "banking_transaction_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "buyer_company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "dimension_line_keys": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DimensionLineKey"
            }
          },
          "dimension_state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DimensionState"
              }
            ]
          },
          "document_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_delivery_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "document_due_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "document_exchange_rate": {
            "type": "string"
          },
          "document_gross_total": {
            "type": "string"
          },
          "document_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_issue_date": {
            "type": "string",
            "format": "date"
          },
          "document_late_fee_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_late_fee_next_calculation_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "document_net_balance": {
            "type": "string"
          },
          "document_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_number": {
            "type": "string"
          },
          "document_number_prefix": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_number_sequence": {
            "type": "string"
          },
          "document_number_suffix": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_po_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_schedule_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "document_shipping_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_state": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "document_status": {
            "type": "string"
          },
          "document_status_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_sub_total": {
            "type": "string"
          },
          "document_terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_total": {
            "type": "string"
          },
          "document_type_id": {
            "type": "string"
          },
          "document_version_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_accrual": {
            "type": "boolean"
          },
          "is_current": {
            "type": "boolean"
          },
          "is_partial_payment_allowed": {
            "type": "boolean"
          },
          "is_recurring": {
            "type": "boolean"
          },
          "late_fee_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "meta_data": {
            "type": [
              "string",
              "null"
            ]
          },
          "min_payment_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_gateway_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "people_id": {
            "type": "string"
          },
          "recurring_document_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "template_id": {
            "type": "string"
          },
          "threshold_crossed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "user_id": {
            "type": "string"
          },
          "version_number": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DocumentPaymentMethod": {
        "type": "object",
        "properties": {
          "is_online": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "payment_gateway_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DocumentPaymentModel": {
        "type": "object",
        "required": [
          "id",
          "document_id",
          "user_id",
          "user_company_id",
          "payment_amount",
          "payment_date",
          "is_tax_deducted",
          "is_payment_approved",
          "created_at",
          "exchange_rate",
          "payment_identifier",
          "anchor_id"
        ],
        "properties": {
          "anchor_id": {
            "type": "string"
          },
          "bank_charge": {
            "type": [
              "string",
              "null"
            ]
          },
          "banking_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "banking_transaction_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "credit_note_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "document_id": {
            "type": "string"
          },
          "exchange_rate": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_payment_approved": {
            "type": "boolean"
          },
          "is_tax_deducted": {
            "type": "boolean"
          },
          "payment_amount": {
            "type": "string"
          },
          "payment_date": {
            "type": "string",
            "format": "date"
          },
          "payment_identifier": {
            "type": "string"
          },
          "payment_mode": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_note": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_company_id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "DocumentRecurringModel": {
        "type": "object",
        "required": [
          "id",
          "company_id",
          "document_type_id",
          "document_id",
          "start_date",
          "recurrence_days",
          "created_at"
        ],
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "delivery_instruction": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_id": {
            "type": "string"
          },
          "document_type_id": {
            "type": "string"
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "id": {
            "type": "string"
          },
          "next_occurrence_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "recurrence_days": {
            "type": "integer",
            "format": "int64"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "DocumentSettingChildModel": {
        "type": "object",
        "required": [
          "setting",
          "attribute"
        ],
        "properties": {
          "attribute": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentFormAttributeModel"
            }
          },
          "setting": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ]
            },
            "propertyNames": {
              "type": "string",
              "enum": [
                "DOCUMENT_NOTE",
                "DOCUMENT_TERM",
                "DOCUMENT_NUMBER_PREFIX",
                "DOCUMENT_NUMBER_SEQUENCE",
                "DOCUMENT_NUMBER_SUFFIX",
                "DOCUMENT_ALLOW_EDIT_SENT",
                "DOCUMENT_SHOW_ITEM_NUMBER",
                "DOCUMENT_SHOW_TAX_SUMMARY",
                "DOCUMENT_NUMBER_GENERATE_MODE",
                "DOCUMENT_ALLOW_PARTIAL_PAYMENT",
                "DOCUMENT_ALLOW_CHARGE_DISCOUNT_SUBTOTAL",
                "DOCUMENT_ALLOW_CHARGE_DISCOUNT_TOTAL",
                "DOCUMENT_ALLOW_FIELD_CHARGE_DISCOUNT_ITEM",
                "DOCUMENT_ALLOW_SCHEDULING"
              ]
            },
            "example": {
              "DOCUMENT_NUMBER_PREFIX": "IN",
              "DOCUMENT_SHOW_TAX_SUMMARY": "1"
            }
          }
        }
      },
      "DocumentSettingModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DocumentSettingChildModel"
          }
        }
      },
      "DocumentStatusModel": {
        "type": "object",
        "required": [
          "id",
          "status",
          "is_active",
          "is_user_defined",
          "is_issued",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_issued": {
            "type": "boolean"
          },
          "is_user_defined": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "status_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "status_note": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_by": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "EmailTemplateTypeModel": {
        "type": "object",
        "required": [
          "id",
          "email_template_type",
          "email_subject",
          "email_body"
        ],
        "properties": {
          "email_body": {
            "type": "string"
          },
          "email_subject": {
            "type": "string"
          },
          "email_template_type": {
            "type": "string"
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          }
        }
      },
      "EndpointResponse": {
        "type": "object",
        "required": [
          "id",
          "url",
          "spec_version",
          "status",
          "enabled_events",
          "header_names",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled_events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "header_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Configured names only. Secret header values are never returned."
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "spec_version": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string"
          }
        }
      },
      "EntityActivityListModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityDbModel"
            }
          }
        }
      },
      "EventBusinessArea": {
        "type": "object",
        "required": [
          "key",
          "label",
          "label_key",
          "resource_groups"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "label_key": {
            "type": "string"
          },
          "resource_groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventResourceGroup"
            }
          }
        }
      },
      "EventResourceGroup": {
        "type": "object",
        "required": [
          "key",
          "label",
          "description",
          "label_key",
          "description_key",
          "events"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "description_key": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventType"
            }
          },
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "label_key": {
            "type": "string"
          }
        }
      },
      "EventType": {
        "type": "object",
        "required": [
          "type",
          "label",
          "description",
          "label_key",
          "description_key"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "description_key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "label_key": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "ExceptionReviewRequest": {
        "type": "object",
        "required": [
          "note"
        ],
        "properties": {
          "note": {
            "type": "string"
          }
        }
      },
      "ExpenseAttModel": {
        "type": "object",
        "required": [
          "attribute_label"
        ],
        "properties": {
          "attribute_label": {
            "type": "string"
          },
          "attribute_value": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ExpenseAttachmentModel": {
        "type": "object",
        "required": [
          "id",
          "attachment_name",
          "attachment_type",
          "attachment_size",
          "attachment_url",
          "created_at"
        ],
        "properties": {
          "attachment_name": {
            "type": "string"
          },
          "attachment_size": {
            "type": "string"
          },
          "attachment_type": {
            "type": "string"
          },
          "attachment_url": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expense_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          }
        }
      },
      "ExpenseDataModel": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "company_id",
          "currency",
          "amount",
          "note",
          "expense_date",
          "is_billable",
          "is_active",
          "is_billed",
          "created_at",
          "exchange_rate",
          "is_tax_inclusive",
          "is_itemize"
        ],
        "properties": {
          "account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "document_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": "string"
          },
          "expense_date": {
            "type": "string",
            "format": "date"
          },
          "expense_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_billable": {
            "type": "boolean"
          },
          "is_billed": {
            "type": "string"
          },
          "is_itemize": {
            "type": "boolean"
          },
          "is_recurring": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_tax_inclusive": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          },
          "paid_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "people_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "user_id": {
            "type": "string"
          },
          "vendor_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ExpenseDeleteFormModel": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "expense_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ExpenseDeleteResponseModel": {
        "type": "object",
        "properties": {
          "deleted_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "non_deleted_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ExpenseDetailResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ExpenseModel"
              }
            ]
          }
        }
      },
      "ExpenseFormModel": {
        "type": "object",
        "required": [
          "paid_account_id",
          "expense_date",
          "items"
        ],
        "properties": {
          "attachment": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/AttachmentModel"
            }
          },
          "attribute": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/AttributeModel"
            }
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ],
            "example": "1"
          },
          "expense_date": {
            "type": [
              "string",
              "null"
            ],
            "example": "2026-04-15"
          },
          "expense_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoice_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_billable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_itemize": {
            "type": "boolean"
          },
          "is_recurring": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_tax_inclusive": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExpenseItemFormModel"
            },
            "minItems": 1
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid_account_id": {
            "type": [
              "string",
              "null"
            ],
            "example": "019dbf14-7e76-7852-babb-4c311341af24"
          },
          "people_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "recurring_end_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "recurring_frequency": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "recurring_start_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "vendor_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ExpenseItemFormModel": {
        "type": "object",
        "required": [
          "expense_account_id",
          "description",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": [
              "string",
              "null"
            ],
            "example": "350.00"
          },
          "client_line_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "Team dinner"
          },
          "dimension_values": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DimensionValueRef"
            }
          },
          "expense_account_id": {
            "type": [
              "string",
              "null"
            ],
            "example": "019dbf14-7e76-7852-babb-4c311341af24"
          },
          "source_line_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "taxes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ExpenseItemTaxFormModel"
            }
          }
        }
      },
      "ExpenseItemTaxFormModel": {
        "type": "object",
        "properties": {
          "tax_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_position": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ExpenseItemTaxModel": {
        "type": "object",
        "required": [
          "id",
          "expense_id",
          "expense_item_id",
          "tax_id",
          "tax_name",
          "tax_rate",
          "tax_type",
          "tax_position",
          "taxable_amount",
          "tax_amount",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expense_id": {
            "type": "string"
          },
          "expense_item_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "tax_amount": {
            "type": "string"
          },
          "tax_id": {
            "type": "string"
          },
          "tax_name": {
            "type": "string"
          },
          "tax_position": {
            "type": "string"
          },
          "tax_rate": {
            "type": "string"
          },
          "tax_type": {
            "type": "string"
          },
          "taxable_amount": {
            "type": "string"
          }
        }
      },
      "ExpenseItemWithTaxes": {
        "type": "object",
        "required": [
          "id",
          "expense_id",
          "description",
          "amount",
          "created_at",
          "taxes"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "client_line_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "dimension_state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DimensionState"
              }
            ]
          },
          "document_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "expense_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "expense_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExpenseItemTaxModel"
            }
          }
        }
      },
      "ExpenseListModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "expenses",
          "status_badges",
          "cards"
        ],
        "properties": {
          "cards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardData"
            }
          },
          "expenses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExpenseDataModel"
            }
          },
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "status_badges": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/StatusMetaData"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ExpenseListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ExpenseListModel"
              }
            ]
          }
        }
      },
      "ExpenseModel": {
        "type": "object",
        "required": [
          "id",
          "currency",
          "amount",
          "exchange_rate",
          "note",
          "expense_date",
          "is_active",
          "is_itemize",
          "is_tax_inclusive",
          "is_billed",
          "created_at"
        ],
        "properties": {
          "account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": "string"
          },
          "attachment": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ExpenseAttachmentModel"
            }
          },
          "attribute": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ExpenseAttModel"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dimension_state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DimensionState"
              }
            ]
          },
          "document_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "document_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": "string"
          },
          "expense_date": {
            "type": "string",
            "format": "date"
          },
          "expense_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_billable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_billed": {
            "type": "string"
          },
          "is_itemize": {
            "type": "boolean"
          },
          "is_recurring": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_tax_inclusive": {
            "type": "boolean"
          },
          "items": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ExpenseItemWithTaxes"
            }
          },
          "note": {
            "type": "string"
          },
          "paid_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "people_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "recurring_end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "recurring_frequency": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "recurring_next_schedule": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "recurring_start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "status_actions": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ExpenseUIData"
              }
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "vendor_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "workflow": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ExpenseStatus": {
        "type": "string",
        "enum": [
          "Draft",
          "Submitted",
          "Approved",
          "Rejected",
          "Cancelled",
          "Reserved",
          "Billed",
          "Invoiced",
          "PartialPaid",
          "Paid",
          "Settled"
        ]
      },
      "ExpenseUIData": {
        "type": "object",
        "required": [
          "ui_elements"
        ],
        "properties": {
          "ui_elements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Action"
            }
          }
        }
      },
      "FormAttributeModel": {
        "type": "object",
        "properties": {
          "attribute_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribute_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "show_in_form": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "FullyConnectedStripConnectModel": {
        "type": "object",
        "required": [
          "id",
          "stripe_account_id",
          "stripe_email",
          "connection_label"
        ],
        "properties": {
          "connection_label": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "stripe_account_id": {
            "type": "string"
          },
          "stripe_email": {
            "type": "string"
          }
        }
      },
      "FxRateSource": {
        "type": "string",
        "description": "Where a resolved exchange rate came from.",
        "enum": [
          "automatic",
          "custom"
        ]
      },
      "FxResolveItem": {
        "type": "object",
        "required": [
          "base",
          "target"
        ],
        "properties": {
          "at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Transaction date: `YYYY-MM-DD` (company-local) or RFC 3339. Omit for today.",
            "example": "2026-09-01"
          },
          "base": {
            "type": "string",
            "description": "Currency to convert from (ISO 4217).",
            "example": "AUD"
          },
          "target": {
            "type": "string",
            "description": "Currency to convert into (ISO 4217).",
            "example": "USD"
          }
        }
      },
      "FxResolveRequest": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FxResolveItem"
            },
            "description": "1–500 lookups."
          }
        }
      },
      "FxResolveResult": {
        "type": "object",
        "description": "One resolved lookup, in request order. `rate` is `null` with `error = RATE_NOT_FOUND`\nwhen neither a custom nor an automatic rate exists for the pair.",
        "required": [
          "base",
          "target",
          "as_of_date_matched"
        ],
        "properties": {
          "as_of_date_matched": {
            "type": "boolean"
          },
          "at": {
            "type": [
              "string",
              "null"
            ]
          },
          "base": {
            "type": "string"
          },
          "custom_rate_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FxRateSource"
              }
            ]
          },
          "target": {
            "type": "string"
          },
          "time": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "InternalServerErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "example": "INTERNAL_SERVER_ERROR"
          }
        }
      },
      "ItemAttModel": {
        "type": "object",
        "required": [
          "item_id",
          "attribute_label"
        ],
        "properties": {
          "attribute_label": {
            "type": "string"
          },
          "attribute_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_system_defined": {
            "type": "boolean",
            "description": "`true` for attributes written by an internal/system flow\n(e.g. the integrations sync worker writing `external_item_id`).\nThe UI hides these from the editable form and surfaces them in\na read-only \"external system\" section instead."
          },
          "item_id": {
            "type": "string"
          },
          "show_in_form": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "ItemAttributeModel": {
        "type": "object",
        "description": "Public write-side payload for a custom field on an item.\n\nNo `is_system_defined` field on this struct. The flag lives on the\n`item_attribute` table and is surfaced on the read DTO\n(`ItemAttModel` in `model/detail.rs`); it's set out-of-band by\nmigrations or the future admin portal.\n\nThe flag is **functionally active** on this code path even so —\n`ItemUpdateRepo::update` scopes its delete-all-then-reinsert to\n`is_system_defined = false`, so any `is_system_defined = true`\nrows seeded out-of-band survive a public PUT untouched. Writes\nfrom this struct always land as `is_system_defined = false` rows.\n\nExtra keys on each attribute object (e.g. `company_id` echoed from a GET)\nare ignored at deserialization so the webapp can round-trip detail payloads\nwithout stripping rows first.",
        "properties": {
          "attribute_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribute_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "show_in_form": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "ItemFormModel": {
        "type": "object",
        "properties": {
          "barcode": {
            "type": [
              "string",
              "null"
            ]
          },
          "dimension_values": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DimensionValueRef"
            }
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-id columns set by the internal integrations import\npath. Public POST/PUT may pass these too, but the typical\nwriter is the bulk-import handler which converts the per-row\n`BulkItemFormModel.external_id` / `external_source` onto this\nfield before the underlying create call."
          },
          "external_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_purchase_price": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "has_sales_price": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "item_attribute": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ItemAttributeModel"
            }
          },
          "item_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_price": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_tax_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "sales_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "sales_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "sales_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "sales_price": {
            "type": [
              "string",
              "null"
            ]
          },
          "sales_tax_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ItemFormResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ItemModel"
          }
        }
      },
      "ItemListModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemModelForList"
            }
          },
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ItemListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ItemListModel"
              }
            ]
          }
        }
      },
      "ItemModel": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "company_id",
          "sku",
          "item_name",
          "item_quantity",
          "item_cost",
          "is_active",
          "item_type",
          "has_sales_price",
          "sales_price",
          "sales_currency",
          "has_purchase_price",
          "purchase_price",
          "purchase_currency"
        ],
        "properties": {
          "barcode": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "type": "string"
          },
          "cost_for_client": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dimension_state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DimensionState"
              }
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_purchase_price": {
            "type": "boolean"
          },
          "has_sales_price": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "item_attribute": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ItemAttModel"
            }
          },
          "item_cost": {
            "type": "string"
          },
          "item_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_name": {
            "type": "string"
          },
          "item_quantity": {
            "type": "string"
          },
          "item_tax": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_type": {
            "type": "string"
          },
          "item_unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "pricing": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ItemPriceResult"
              }
            ]
          },
          "purchase_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_currency": {
            "type": "string"
          },
          "purchase_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_price": {
            "type": "string"
          },
          "purchase_tax_ids": {},
          "sales_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "sales_currency": {
            "type": "string"
          },
          "sales_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "sales_price": {
            "type": "string"
          },
          "sales_tax_ids": {},
          "sku": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "ItemModelForList": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "company_id",
          "item_name",
          "item_quantity",
          "item_cost",
          "is_active",
          "item_type",
          "sku",
          "has_sales_price",
          "sales_price",
          "sales_currency",
          "has_purchase_price",
          "purchase_price",
          "purchase_currency"
        ],
        "properties": {
          "barcode": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "type": "string"
          },
          "cost_for_client": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "has_purchase_price": {
            "type": "boolean"
          },
          "has_sales_price": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "item_cost": {
            "type": "string"
          },
          "item_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_name": {
            "type": "string"
          },
          "item_quantity": {
            "type": "string"
          },
          "item_tax": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_type": {
            "type": "string"
          },
          "item_unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_currency": {
            "type": "string"
          },
          "purchase_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_price": {
            "type": "string"
          },
          "purchase_tax_ids": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          },
          "sales_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "sales_currency": {
            "type": "string"
          },
          "sales_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "sales_price": {
            "type": "string"
          },
          "sales_tax_ids": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          },
          "sku": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "ItemPriceResult": {
        "type": "object",
        "required": [
          "item_cost",
          "resolved_taxes"
        ],
        "properties": {
          "banking_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_cost": {
            "type": "string"
          },
          "item_purchase_cost_snapshot": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_sales_cost_snapshot": {
            "type": [
              "string",
              "null"
            ]
          },
          "resolved_taxes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "JournalDimensionCaptureState": {
        "type": "object",
        "required": [
          "lines"
        ],
        "properties": {
          "lines": {
            "type": "object",
            "description": "Concrete persisted user-line IDs, excluding generated FX rounding rows.",
            "additionalProperties": {
              "$ref": "#/components/schemas/JournalDimensionLineState"
            },
            "propertyNames": {
              "type": "string"
            }
          }
        }
      },
      "JournalDimensionLineState": {
        "type": "object",
        "required": [
          "dimension_state"
        ],
        "properties": {
          "client_line_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "dimension_state": {
            "$ref": "#/components/schemas/DimensionState"
          }
        }
      },
      "JournalEntryMetadata": {
        "type": "object",
        "required": [
          "root_entity_type",
          "root_entity_id"
        ],
        "properties": {
          "custom_data": {
            "description": "Custom module-specific data"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "related_entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "related_entity_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "root_entity_id": {
            "type": "string"
          },
          "root_entity_type": {
            "type": "string"
          }
        }
      },
      "JournalIdModel": {
        "type": "object",
        "properties": {
          "journal_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "journal_line_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "JournalLineItem": {
        "type": "object",
        "required": [
          "id",
          "account_id",
          "amount",
          "base_currency_amount",
          "type",
          "is_reconciled",
          "created_at",
          "banking_journal_id"
        ],
        "properties": {
          "account_id": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "banking_journal_id": {
            "type": "string"
          },
          "base_currency_amount": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_reconciled": {
            "type": "boolean"
          },
          "line_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "people_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": "string"
          }
        }
      },
      "JournalLineModel": {
        "type": "object",
        "properties": {
          "account_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "client_line_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "credit": {
            "type": [
              "string",
              "null"
            ]
          },
          "debit": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dimension_values": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DimensionValueRef"
            }
          },
          "dimensions": {
            "type": "object",
            "description": "Resolved posting facts. Owning source adapters validate these before posting.",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "is_tax": {
            "type": "boolean"
          },
          "is_taxable": {
            "type": "boolean"
          },
          "line_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "people_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_line_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_direction": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_meta_data": {}
        }
      },
      "JournalVersionHistoryItem": {
        "type": "object",
        "required": [
          "id",
          "version_number",
          "is_current",
          "created_at",
          "transaction_hash",
          "is_voided"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "is_current": {
            "type": "boolean"
          },
          "is_voided": {
            "type": "boolean"
          },
          "prev_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_hash": {
            "type": "string"
          },
          "version_number": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "JournalVoidError": {
        "type": "object",
        "required": [
          "journal_id",
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "identifier": {
            "type": [
              "string",
              "null"
            ]
          },
          "journal_id": {
            "type": "string"
          }
        }
      },
      "JournalVoidSuccess": {
        "type": "object",
        "required": [
          "journal_id"
        ],
        "properties": {
          "identifier": {
            "type": [
              "string",
              "null"
            ]
          },
          "journal_id": {
            "type": "string"
          }
        }
      },
      "LateFeeDbModel": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "company_id",
          "label",
          "rate",
          "calc_type",
          "is_active",
          "term",
          "calc_base"
        ],
        "properties": {
          "calc_base": {
            "type": "string"
          },
          "calc_type": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "label": {
            "type": "string"
          },
          "rate": {
            "type": "string"
          },
          "term": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "LateFeeDetailResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LateFeeDbModel"
              }
            ]
          }
        }
      },
      "LateFeeFormModel": {
        "type": "object",
        "properties": {
          "calc_base": {
            "type": [
              "string",
              "null"
            ]
          },
          "calc_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "term": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LateFeeFormResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LateFeeDbModel"
          }
        }
      },
      "LateFeeListModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "late_fees"
        ],
        "properties": {
          "late_fees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LateFeeDbModel"
            }
          },
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "LateFeeListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LateFeeListModel"
              }
            ]
          }
        }
      },
      "LedgerEffect": {
        "type": "string",
        "description": "What a document status transition should do to the entity's own journal.\nStored on `document_state_transition`, independent of the free-text status\nlabel (which operators can write in any language).",
        "enum": [
          "none",
          "post",
          "void",
          "payment"
        ]
      },
      "Locale": {
        "type": "object",
        "required": [
          "country_code",
          "code",
          "name"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "LocaleListModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Locale"
            }
          }
        }
      },
      "LocaleModel": {
        "type": "object",
        "required": [
          "code",
          "name"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "MatchGroupTransactionModel": {
        "type": "object",
        "properties": {
          "match_policy_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "selection": {
            "type": [
              "string",
              "null"
            ]
          },
          "transactions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "MatchModel": {
        "type": "object",
        "required": [
          "transaction_id",
          "amount",
          "currency",
          "date"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "confidence_tier": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "doc_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "doc_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "doc_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "doc_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "doc_exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "doc_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "doc_people": {
            "type": [
              "string",
              "null"
            ]
          },
          "doc_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "doc_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "entity": {
            "type": [
              "string",
              "null"
            ]
          },
          "entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "match_reasons": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "score": {
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_id": {
            "type": "string"
          }
        }
      },
      "OAuthClientRegistrationFormModel": {
        "type": "object",
        "required": [
          "redirect_uris"
        ],
        "properties": {
          "client_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "client_uri": {
            "type": [
              "string",
              "null"
            ]
          },
          "grant_types": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "logo_uri": {
            "type": [
              "string",
              "null"
            ]
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Optional at dynamic registration. Effective MCP permissions are granted\nduring the OAuth consent flow, not required upfront at register time."
          },
          "redirect_uris": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "response_types": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "scope": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 7591 scope string; normalized into `permissions` when that field is empty."
          },
          "token_endpoint_auth_method": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PartnerActionModel": {
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "PartnerActionResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PartnerActionModel"
          }
        }
      },
      "PartnerSessionForm": {
        "type": "object",
        "description": "Either one user (`user_id` or `external_user_id`) or a batch in `users`.\nA session always names a user; there is no company-only session.",
        "properties": {
          "external_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerSessionUserForm"
            }
          }
        }
      },
      "PartnerSessionResultModel": {
        "type": "object",
        "required": [
          "outcome"
        ],
        "properties": {
          "access_token": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "error_code": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expires_in": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "external_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "$ref": "#/components/schemas/SessionOutcome"
          },
          "permissions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "token_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PartnerSessionUserForm": {
        "type": "object",
        "properties": {
          "external_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PartnerSessionsResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerSessionResultModel"
            }
          }
        }
      },
      "PartnerTokenForm": {
        "type": "object",
        "required": [
          "client_id"
        ],
        "properties": {
          "client_assertion": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 7523 client assertion for `private_key_jwt`."
          },
          "client_id": {
            "type": "string"
          },
          "client_secret": {
            "type": [
              "string",
              "null"
            ]
          },
          "grant_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Must be `client_credentials`."
          }
        }
      },
      "PartnerTokenModel": {
        "type": "object",
        "required": [
          "access_token",
          "token_type",
          "expires_in",
          "partner_id"
        ],
        "properties": {
          "access_token": {
            "type": "string"
          },
          "expires_in": {
            "type": "integer",
            "format": "int64"
          },
          "partner_id": {
            "type": "string"
          },
          "token_type": {
            "type": "string"
          }
        }
      },
      "PartnerTokenResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PartnerTokenModel"
          }
        }
      },
      "PartnerUserCreateForm": {
        "type": "object",
        "required": [
          "external_user_id",
          "email",
          "name",
          "acl_id"
        ],
        "properties": {
          "acl_id": {
            "type": "string",
            "description": "`acl_company_role.id` from the company's own role list. Portal roles\n(client, vendor) are refused."
          },
          "email": {
            "type": "string"
          },
          "external_user_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "PartnerUserModel": {
        "type": "object",
        "required": [
          "user_id",
          "company_id",
          "outcome"
        ],
        "properties": {
          "company_id": {
            "type": "string"
          },
          "external_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "$ref": "#/components/schemas/ProvisionOutcome"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "PartnerUserResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PartnerUserModel"
          }
        }
      },
      "PaymentFromModel": {
        "type": "object",
        "properties": {
          "anchor_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank_charge": {
            "type": [
              "string",
              "null"
            ]
          },
          "banking_transaction_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "credit_note_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "deposit_account": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_tax_deducted": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "payment_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_mode": {
            "type": [
              "string",
              "null"
            ]
          },
          "receiver_mode": {
            "type": "boolean"
          },
          "reference_note": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_amount": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PaymentFromResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DocumentPaymentModel"
          }
        }
      },
      "PeopleAttributeModel": {
        "type": "object",
        "description": "Public write-side payload for a custom field on a person (client\nor vendor).\n\nThe write schema is intentionally narrow — no `is_system_defined`\nfield. The flag lives on the underlying `people_attribute` table\nand is surfaced on the read DTO (`PeopleAttributeModel` in\n`model/detail.rs`), but it can only be set out-of-band: by\nmigrations or by the future admin portal.\n\nThe flag is **functionally active** on this code path even so —\n`PeopleUpdateRepo::update` scopes its delete-all-then-reinsert to\n`is_system_defined = false`, so any `is_system_defined = true`\nrows seeded out-of-band survive a public PUT untouched. Writes\nfrom this struct always land as `is_system_defined = false` rows.\n\nExtra keys on each attribute object (e.g. `id`, `company_id` echoed\nfrom a GET) are ignored at deserialization so the webapp can round-trip\ndetail payloads without stripping rows first.",
        "properties": {
          "attribute_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribute_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "show_in_pdf": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "PeopleContactModel": {
        "type": "object",
        "properties": {
          "contact_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PeopleData": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "company_id",
          "currency",
          "locale",
          "people_type",
          "company_name",
          "company_email",
          "is_active",
          "is_portal_enabled",
          "created_at"
        ],
        "properties": {
          "billing_city": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_street1": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_street2": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "buyer_company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_email": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "company_name": {
            "type": "string"
          },
          "contact_first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dimension_state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DimensionState"
              }
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "internal_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "is_portal_enabled": {
            "type": "boolean"
          },
          "late_fee": {
            "type": [
              "string",
              "null"
            ]
          },
          "locale": {
            "type": "string"
          },
          "payment_term": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "people_attribute": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/PeopleAttributeModel"
            }
          },
          "people_contact": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/PeopleContactModel"
            }
          },
          "people_type": {
            "type": "string"
          },
          "shipping_city": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_street1": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_street2": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "PeopleDeleteResponseModel": {
        "type": "object",
        "required": [
          "delete_id"
        ],
        "properties": {
          "delete_id": {
            "type": "string"
          }
        }
      },
      "PeopleDetailResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PeopleData"
              }
            ]
          }
        }
      },
      "PeopleFormModel": {
        "type": "object",
        "properties": {
          "billing_city": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_street1": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_street2": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "dimension_values": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/DimensionValueRef"
            }
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-id columns set by the internal integrations import\npath. Public POST/PUT may pass these too — that's fine — but\nthe typical writer is the bulk-import handler, which converts\n`BulkPeopleFormModel.external_id` / `external_source` onto this\nfield for the underlying `PeopleCreateRepo::create` call."
          },
          "external_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "internal_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_portal_enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "late_fee": {
            "type": [
              "string",
              "null"
            ]
          },
          "locale": {
            "type": [
              "string",
              "null"
            ]
          },
          "partner_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_term": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "people_attribute": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/PeopleAttributeModel"
            }
          },
          "people_contact": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/PeopleContactModel"
            }
          },
          "shipping_city": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_street1": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_street2": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_zip": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PeopleFormResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PeopleModel"
          }
        }
      },
      "PeopleFullListResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object"
          }
        }
      },
      "PeopleListModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "peoples"
        ],
        "properties": {
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "peoples": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PeopleData"
            }
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PeopleListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PeopleListModel"
              }
            ]
          }
        }
      },
      "PeopleModel": {
        "type": "object",
        "required": [
          "id",
          "currency",
          "locale",
          "people_type",
          "company_name",
          "company_email",
          "is_active",
          "is_portal_enabled",
          "created_at"
        ],
        "properties": {
          "billing_city": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_street1": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_street2": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "buyer_company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_email": {
            "type": "string"
          },
          "company_name": {
            "type": "string"
          },
          "contact_first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dimension_state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DimensionState"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "internal_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "is_portal_enabled": {
            "type": "boolean"
          },
          "late_fee": {
            "type": [
              "string",
              "null"
            ]
          },
          "locale": {
            "type": "string"
          },
          "payment_term": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "people_type": {
            "type": "string"
          },
          "shipping_city": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_street1": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_street2": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "ProjectAttachmentDbModel": {
        "type": "object",
        "required": [
          "id",
          "company_id",
          "user_id",
          "attachment_name",
          "attachment_size",
          "attachment_type",
          "attachment_url"
        ],
        "properties": {
          "attachment_name": {
            "type": "string"
          },
          "attachment_size": {
            "type": "string"
          },
          "attachment_type": {
            "type": "string"
          },
          "attachment_url": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "ProjectDetailResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectModel"
              }
            ]
          }
        }
      },
      "ProjectFormModel": {
        "type": "object",
        "properties": {
          "attachment": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/AttachmentModel"
            }
          },
          "billing_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "budget": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "people_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_cost": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_manager": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "staff": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/StaffModel"
            }
          },
          "task": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/TaskModel"
            }
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ProjectFormResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectModel"
              }
            ]
          }
        }
      },
      "ProjectListModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "projects"
        ],
        "properties": {
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectModel"
            }
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ProjectListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectListModel"
              }
            ]
          }
        }
      },
      "ProjectModel": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "company_id",
          "currency",
          "title",
          "budget",
          "billing_method"
        ],
        "properties": {
          "attachment": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ProjectAttachmentDbModel"
            }
          },
          "billing_method": {
            "type": "string"
          },
          "budget": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "id": {
            "type": "string"
          },
          "people_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_cost": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_manager": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "staff": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ProjectStaffDbModel"
            }
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "task": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ProjectTaskMappingModel"
            }
          },
          "time_estimation": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "total_project_cost": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "ProjectStaffDbModel": {
        "type": "object",
        "required": [
          "id",
          "project_id",
          "company_id",
          "user_id"
        ],
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "hour_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "ProjectTaskDbModel": {
        "type": "object",
        "required": [
          "id",
          "company_id",
          "title"
        ],
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "hour_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "ProjectTaskMappingModel": {
        "type": "object",
        "required": [
          "id",
          "project_task_id"
        ],
        "properties": {
          "deleted_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "hour_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "project_task_id": {
            "type": "string"
          },
          "task_title": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ProjectTimesheetDbModel": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "company_id",
          "project_id",
          "project_task_id",
          "timesheet_date",
          "logged_hours",
          "is_billable",
          "status"
        ],
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "invoice_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_billable": {
            "type": "boolean"
          },
          "logged_hours": {
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_id": {
            "type": "string"
          },
          "project_task_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "timesheet_date": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "ProvisionCompaniesForm": {
        "type": "object",
        "required": [
          "companies"
        ],
        "properties": {
          "companies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProvisionCompanyForm"
            }
          }
        }
      },
      "ProvisionCompaniesResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProvisionCompanyResultModel"
            }
          }
        }
      },
      "ProvisionCompanyForm": {
        "type": "object",
        "required": [
          "external_company_id",
          "company_name",
          "country",
          "currency",
          "locale",
          "timezone",
          "owner"
        ],
        "properties": {
          "company_name": {
            "type": "string"
          },
          "company_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2."
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217."
          },
          "external_company_id": {
            "type": "string"
          },
          "locale": {
            "type": "string",
            "description": "e.g. `en-US`."
          },
          "owner": {
            "$ref": "#/components/schemas/ProvisionOwnerForm"
          },
          "timezone": {
            "type": "string"
          }
        }
      },
      "ProvisionCompanyResultModel": {
        "type": "object",
        "required": [
          "external_company_id",
          "outcome"
        ],
        "properties": {
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "error_code": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "external_company_id": {
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/ProvisionOutcome"
          },
          "owner_user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ProvisionOutcome": {
        "type": "string",
        "enum": [
          "created",
          "existing",
          "failed"
        ]
      },
      "ProvisionOwnerForm": {
        "type": "object",
        "required": [
          "external_user_id",
          "email",
          "name"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "external_user_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "PublicEmailConfirmationCodeRequest": {
        "type": "object",
        "properties": {
          "confirmation_context": {
            "type": [
              "string",
              "null"
            ]
          },
          "confirmation_entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ReconciliationConfirmFormModel": {
        "type": "object",
        "properties": {
          "calculated_balance": {
            "type": [
              "string",
              "null"
            ]
          },
          "closing_balance": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "diff": {
            "type": [
              "string",
              "null"
            ]
          },
          "journals": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/JournalIdModel"
            }
          },
          "opening_balance": {
            "type": [
              "string",
              "null"
            ]
          },
          "reconciliation_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ReconciliationFormModel": {
        "type": "object",
        "properties": {
          "account": {
            "type": [
              "string",
              "null"
            ]
          },
          "calculated_balance": {
            "type": [
              "string",
              "null"
            ]
          },
          "closing_balance": {
            "type": [
              "string",
              "null"
            ]
          },
          "diff": {
            "type": [
              "string",
              "null"
            ]
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "opening_balance": {
            "type": [
              "string",
              "null"
            ]
          },
          "start_date": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ReconciliationVoidFormModel": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "RepairRequest": {
        "type": "object",
        "required": [
          "kind",
          "source_id"
        ],
        "properties": {
          "kind": {
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "preview_token": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_id": {
            "type": "string"
          }
        }
      },
      "ResolvedDimension": {
        "type": "object",
        "required": [
          "dimension_id",
          "value_id",
          "dimension_name",
          "value_name",
          "value_code",
          "path"
        ],
        "properties": {
          "dimension_id": {
            "type": "string"
          },
          "dimension_name": {
            "type": "string"
          },
          "path": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValuePathEntry"
            }
          },
          "value_code": {
            "type": "string"
          },
          "value_id": {
            "type": "string"
          },
          "value_name": {
            "type": "string"
          }
        }
      },
      "SecurityErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "example": "INVALID_SECURITY_SIGNATURE"
          }
        }
      },
      "SessionOutcome": {
        "type": "string",
        "enum": [
          "minted",
          "failed"
        ]
      },
      "SettingFromModel": {
        "type": "object",
        "required": [
          "setting"
        ],
        "properties": {
          "attribute": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/FormAttributeModel"
            }
          },
          "setting": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ]
            },
            "propertyNames": {
              "type": "string",
              "enum": [
                "DOCUMENT_NOTE",
                "DOCUMENT_TERM",
                "DOCUMENT_NUMBER_PREFIX",
                "DOCUMENT_NUMBER_SEQUENCE",
                "DOCUMENT_NUMBER_SUFFIX",
                "DOCUMENT_ALLOW_EDIT_SENT",
                "DOCUMENT_SHOW_ITEM_NUMBER",
                "DOCUMENT_SHOW_TAX_SUMMARY",
                "DOCUMENT_NUMBER_GENERATE_MODE",
                "DOCUMENT_ALLOW_PARTIAL_PAYMENT",
                "DOCUMENT_ALLOW_CHARGE_DISCOUNT_SUBTOTAL",
                "DOCUMENT_ALLOW_CHARGE_DISCOUNT_TOTAL",
                "DOCUMENT_ALLOW_FIELD_CHARGE_DISCOUNT_ITEM",
                "DOCUMENT_ALLOW_SCHEDULING"
              ]
            },
            "example": {
              "DOCUMENT_NUMBER_PREFIX": "IN",
              "DOCUMENT_SHOW_TAX_SUMMARY": "1"
            }
          }
        }
      },
      "SmtpDeleteResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "boolean"
          }
        }
      },
      "SmtpFormModel": {
        "type": "object",
        "properties": {
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "password": {
            "type": [
              "string",
              "null"
            ],
            "description": "Write-only credential. Omit or send an empty string on update to retain the configured password.",
            "writeOnly": true
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "server": {
            "type": [
              "string",
              "null"
            ]
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SmtpPublicDetailResponse": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SmtpPublicModel"
              }
            ]
          }
        }
      },
      "SmtpPublicFormResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SmtpPublicModel"
          }
        }
      },
      "SmtpPublicModel": {
        "type": "object",
        "description": "HTTP response view. SMTP credentials never leave the mail-delivery boundary.",
        "required": [
          "id",
          "server",
          "password_configured"
        ],
        "properties": {
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "password_configured": {
            "type": "boolean"
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "server": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "StaffModel": {
        "type": "object",
        "properties": {
          "hour_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "StatementEntry": {
        "type": "object",
        "required": [
          "id",
          "document_id",
          "date",
          "kind",
          "reference",
          "debit",
          "credit",
          "balance"
        ],
        "properties": {
          "balance": {
            "type": "string"
          },
          "credit": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "debit": {
            "type": "string",
            "description": "Exact company-base-currency amounts, represented as decimal strings."
          },
          "document_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          }
        }
      },
      "StatusFormModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_issued": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "At most one issued status per document type. Saving true clears the rest."
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "status_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "status_note": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "StatusFormResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DocumentStatusModel"
          }
        }
      },
      "StatusListModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusModel"
            }
          }
        }
      },
      "StatusMetaData": {
        "type": "object",
        "required": [
          "label",
          "color",
          "icon"
        ],
        "properties": {
          "color": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "StatusModel": {
        "type": "object",
        "required": [
          "id",
          "status",
          "status_color",
          "is_user_defined"
        ],
        "properties": {
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "is_issued": {
            "type": "boolean"
          },
          "is_user_defined": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "status_color": {
            "type": "string"
          },
          "status_note": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_by": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "StripeConnectListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/FullyConnectedStripConnectModel"
            }
          }
        }
      },
      "StripeConnectRawListResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object"
          }
        }
      },
      "StripeConnectUrlResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object"
          }
        }
      },
      "SubscriptionCompanyModel": {
        "type": "object",
        "required": [
          "id",
          "stripe_subscription_id",
          "subscription_status",
          "charge_start_at",
          "charge_next_at",
          "subscription_created_at"
        ],
        "properties": {
          "charge_next_at": {
            "type": "string",
            "format": "date-time"
          },
          "charge_start_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "type": [
              "string",
              "null"
            ]
          },
          "stripe_subscription_id": {
            "type": "string"
          },
          "subscription_created_at": {
            "type": "string",
            "format": "date-time"
          },
          "subscription_payment": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SubscriptionPaymentSnapshotModel",
                "description": "Latest `subscription_payment` snapshot so subscription overview screens do not need a second detail call."
              }
            ]
          },
          "subscription_payment_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Latest `subscription_payment` row for the company by `created_at` (trial/free rows included)."
          },
          "subscription_status": {
            "type": "string"
          }
        }
      },
      "SubscriptionPaymentSnapshotModel": {
        "type": "object",
        "required": [
          "id",
          "payment_amount",
          "reference_number",
          "payment_status",
          "payment_type",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_amount": {
            "type": "string"
          },
          "payment_status": {
            "type": "string"
          },
          "payment_type": {
            "type": "string"
          },
          "reference_number": {
            "type": "string"
          }
        }
      },
      "TaskFormModel": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "hour_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "task_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TaskFormResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectTaskDbModel"
              }
            ]
          }
        }
      },
      "TaskListModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "task"
        ],
        "properties": {
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "task": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskModel"
            }
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "TaskListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TaskListModel"
              }
            ]
          }
        }
      },
      "TaskModel": {
        "type": "object",
        "required": [
          "id",
          "title"
        ],
        "properties": {
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "hour_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "total_billed_time": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_log_time": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_unbilled_time": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TaxCreateModel": {
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_recoverable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_category": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_group_ids": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_value": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TaxCreateResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TaxDbModel"
          }
        }
      },
      "TaxDbModel": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "tax_type",
          "tax_name",
          "tax_value",
          "is_active",
          "display_label",
          "tax_category",
          "is_recoverable",
          "company_id"
        ],
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_label": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_recoverable": {
            "type": "boolean"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_category": {
            "type": "string"
          },
          "tax_group_ids": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_name": {
            "type": "string"
          },
          "tax_type": {
            "type": "string"
          },
          "tax_value": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "TaxDetailResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TaxDbModel"
              }
            ]
          }
        }
      },
      "TaxListModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "taxes"
        ],
        "properties": {
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxModel"
            }
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "TaxListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TaxListModel"
              }
            ]
          }
        }
      },
      "TaxModel": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "tax_type",
          "tax_name",
          "tax_value",
          "is_active",
          "display_label",
          "tax_category",
          "is_recoverable",
          "company_id"
        ],
        "properties": {
          "company_id": {
            "type": "string"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_label": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_recoverable": {
            "type": "boolean"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_category": {
            "type": "string"
          },
          "tax_group_ids": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_name": {
            "type": "string"
          },
          "tax_type": {
            "type": "string"
          },
          "tax_value": {
            "type": "string"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "TaxReportSubmissionRequestModel": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "date_range": {
            "type": [
              "string",
              "null"
            ]
          },
          "report_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TaxSummary": {
        "type": "object",
        "required": [
          "total",
          "display_label",
          "tax_name",
          "tax_rate",
          "taxable_amount"
        ],
        "properties": {
          "display_label": {
            "type": "string"
          },
          "tax_name": {
            "type": "string"
          },
          "tax_rate": {
            "type": "string"
          },
          "taxable_amount": {
            "type": "string"
          },
          "total": {
            "type": "string"
          }
        }
      },
      "TaxUpdateModel": {
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_recoverable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_category": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_group_ids": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_value": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TaxUpdateResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TaxDbModel"
          }
        }
      },
      "TimesheetFormModel": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_billable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "logged_hours": {
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_task_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "timesheet_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TimesheetFormResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProjectTimesheetDbModel"
              }
            ]
          }
        }
      },
      "TimesheetInvoiceFormModel": {
        "type": "object",
        "required": [
          "group_by",
          "timesheet_id",
          "project_id",
          "project_title",
          "billing_method"
        ],
        "properties": {
          "billing_method": {
            "type": "string"
          },
          "group_by": {
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_cost": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_id": {
            "type": "string"
          },
          "project_task_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_title": {
            "type": "string"
          },
          "task_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "timesheet_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "timesheet_id": {
            "type": "string"
          },
          "unbilled_hours": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TimesheetInvoiceResponseModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimesheetInvoiceFormModel"
            }
          }
        }
      },
      "TimesheetListModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "timesheet"
        ],
        "properties": {
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "timesheet": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimesheetModel"
            }
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "TimesheetListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TimesheetListModel"
              }
            ]
          }
        }
      },
      "TimesheetModel": {
        "type": "object",
        "required": [
          "id",
          "project_id",
          "project_task_id",
          "user_id",
          "timesheet_date",
          "logged_hours",
          "is_billable",
          "status"
        ],
        "properties": {
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "invoice_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_billable": {
            "type": "boolean"
          },
          "logged_hours": {
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_id": {
            "type": "string"
          },
          "project_task_id": {
            "type": "string"
          },
          "project_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "task_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "timesheet_date": {
            "type": "string",
            "format": "date"
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "Timezone": {
        "type": "object",
        "required": [
          "country_code",
          "timezone"
        ],
        "properties": {
          "country_code": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        }
      },
      "TimezoneListModel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Timezone"
            }
          }
        }
      },
      "TimezoneModel": {
        "type": "object",
        "required": [
          "code",
          "name"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "TransactionConfirmFormModel": {
        "type": "object",
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "entity": {
            "type": [
              "string",
              "null"
            ]
          },
          "mapping": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/TransactionMappingModel"
            }
          }
        }
      },
      "TransactionExcludeFormModel": {
        "type": "object",
        "properties": {
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "transactions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "TransactionMappingModel": {
        "type": "object",
        "properties": {
          "amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "original_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "original_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TransactionRestoreFormModel": {
        "type": "object",
        "properties": {
          "transactions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "TransactionRevertFormModel": {
        "type": "object",
        "properties": {
          "transactions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "TransitionFromModel": {
        "type": "object",
        "properties": {
          "anchor_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "to_state": {
            "type": [
              "string",
              "null"
            ],
            "example": "open"
          }
        }
      },
      "UpdateDimensionRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DimensionScope"
            }
          }
        },
        "additionalProperties": false
      },
      "UpdateDimensionValueRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_group": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "parent_value_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "UpdateEndpointRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled_events": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "headers": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CustomHeaderInput"
            }
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UserActivityListModel": {
        "type": "object",
        "required": [
          "total_records",
          "page_size",
          "page_number",
          "activity"
        ],
        "properties": {
          "activity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityDbModel"
            }
          },
          "page_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "page_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total_records": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "UserActivityListResponseModel": {
        "type": "object",
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UserActivityListModel"
              }
            ]
          }
        }
      },
      "UserError": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "details": {},
          "message": {
            "type": "string"
          }
        }
      },
      "UserErrorModel": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/UserError"
          }
        }
      },
      "ValidateAppTokenFormModel": {
        "type": "object",
        "properties": {
          "token": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ValidationErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "array",
            "items": {
              "type": "string",
              "additionalProperties": true
            }
          }
        },
        "example": {
          "error": {
            "item_name": [
              "REQUIRED_FIELD"
            ],
            "unit_price": [
              "MUST_BE_POSITIVE"
            ]
          }
        }
      },
      "Value": {},
      "ValueCounts": {
        "type": "object",
        "required": [
          "active",
          "archived",
          "all"
        ],
        "properties": {
          "active": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "all": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "archived": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ValuePathEntry": {
        "type": "object",
        "required": [
          "id",
          "code",
          "name"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "VoidJournalForm": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "journal_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Journals to void, by anchor_id. The current version of each journal is\nvoided. Transitional: the current version's id is also accepted; an\narchived version id is rejected with JOURNAL_NOT_CURRENT."
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "WebhookProtocolResponse": {
        "type": "object",
        "required": [
          "header_prefix",
          "signature_header",
          "event_id_header",
          "delivery_attempt_header",
          "user_agent"
        ],
        "properties": {
          "delivery_attempt_header": {
            "type": "string"
          },
          "event_id_header": {
            "type": "string"
          },
          "header_prefix": {
            "type": "string"
          },
          "signature_header": {
            "type": "string"
          },
          "user_agent": {
            "type": "string"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Access & Permissions",
      "description": "### Access Control & Authorization\n\nThis module manages role-based access control (RBAC) across the platform. It defines how users are authorized to perform actions within a company by assigning roles and permissions.\n\n**Key Capabilities:**\n- Create and manage company-specific roles\n- Assign granular permissions to roles across modules\n- Resolve effective permissions for users\n- Enforce secure, tenant-isolated access using RLS (Row-Level Security)\n\n**How It Works:**\nEach user is associated with a role within a company. Roles contain a set of permissions (e.g., `invoice.create`, `expense.approve`) that determine what actions the user can perform.\n\nAll access checks are evaluated dynamically and are scoped per tenant, ensuring strict data isolation and security.\n\n**Use Cases:**\n- Define Admin, Accountant, or Viewer roles\n- Restrict access to sensitive operations (e.g., financial approvals)\n- Enable fine-grained feature control across modules\n\n"
    },
    {
      "name": "Action Verification",
      "description": "Context-bound email confirmation challenges for sensitive actions."
    },
    {
      "name": "App Connect",
      "description": "Create and manage external application credentials, role-backed access, token exchange, and App Connect audit trails."
    },
    {
      "name": "Partner",
      "description": "Backend-integrated partners: partner token, tenant provisioning, user management on partner-owned companies."
    },
    {
      "name": "Webhooks",
      "description": "Configure signed webhook notifications and inspect their event catalog."
    },
    {
      "name": "Company / Payment Instructions",
      "description": "### Treasury & Payout Configuration\nEndpoints for managing the organization's verified bank accounts and disbursement methods. These instructions serve as the authoritative source for automated payouts, payroll distribution, and bank reconciliation within the accounting engine. \n\n**Security Note:** All modifications are recorded in the system audit log to maintain fiscal integrity."
    },
    {
      "name": "Company",
      "description": "### Organization Management\nEndpoints for creating, updating, and managing company profiles. Includes onboarding workflows, logo management, and soft-delete capabilities."
    },
    {
      "name": "Company / Connections",
      "description": "### Inter-Company Relationships\nManagement of company-to-company connection mappings, enabling B2B collaboration and document exchange between organizations."
    },
    {
      "name": "Company / Currency",
      "description": "### Multi-Currency Configuration\nEndpoints for configuring the currencies supported by the organization, including default currency selection and exchange rate preferences."
    },
    {
      "name": "Company / Email Templates",
      "description": "### Transactional Email Customization\nManagement of email templates used for automated communications such as invoice delivery, payment reminders, and receipt notifications."
    },
    {
      "name": "Company / Payment Gateways",
      "description": "### Payment Processing Integration\nConfiguration of external payment gateway credentials (e.g., Stripe, PayPal) enabling online payment collection through invoices and checkout flows."
    },
    {
      "name": "Company / Payment Modes",
      "description": "### Accepted Payment Methods\nManagement of the payment methods (e.g., Bank Transfer, Cash, Cheque) that the organization accepts from its clients."
    },
    {
      "name": "Company / Payment Terms",
      "description": "### Invoice Payment Terms\nConfiguration of standard payment term templates (e.g., Net 30, Net 60, Due on Receipt) applied to invoices and bills."
    },
    {
      "name": "Company / Email Delivery",
      "description": "### Email Delivery Configuration\nManagement of SMTP server settings used for sending transactional emails. Supports TLS/SSL security methods and custom server configurations."
    },
    {
      "name": "Company / Stripe Connect",
      "description": "### Stripe Connect Integration\nEndpoints for managing Stripe Connect accounts, enabling marketplace-style payment flows with connected account onboarding, status tracking, and account lifecycle management."
    },
    {
      "name": "Items",
      "description": "### Product & Service Registry\n\nCentralized management of the organization's catalog. This module handles both tangible inventory and intangible services, providing the essential pricing, tax, and accounting metadata required for document line items (Invoices, Bills, and Quotes)."
    },
    {
      "name": "Clients",
      "description": "### Customer Relationship Management\n\nCentral registry for all revenue-generating entities. This module tracks client profiles, billing addresses, and default payment terms used to automate the generation of **Quotes** and **Invoices**."
    },
    {
      "name": "Vendors",
      "description": "### Supplier & Partner Registry\n\nManagement of external service providers and product suppliers. Use these endpoints to maintain procurement contact data, default expense categories, and credit terms for **Bills** and **Purchase Orders**."
    },
    {
      "name": "Invoices",
      "description": "### Accounts Receivable\n\nFormal billing documents issued to clients. Use these endpoints to manage the lifecycle of revenue collection, from draft generation to final payment reconciliation."
    },
    {
      "name": "Quotes",
      "description": "### Sales Proposals\n\nNon-binding estimates and price quotes. These serve as the initial engagement point and can be converted into active Invoices once approved by the customer."
    },
    {
      "name": "Credit Notes",
      "description": "### Revenue Adjustments\n\nDocuments issued to reduce a customer's balance. Essential for handling returns, disputes, or overpayments while maintaining an accurate audit trail."
    },
    {
      "name": "Bills",
      "description": "### Accounts Payable\n\nVendor-issued invoices recorded for internal payment. Use these to track external liabilities and manage outgoing cash flow and supplier settlements."
    },
    {
      "name": "Purchase Orders",
      "description": "### Procurement Control\n\nOfficial authorization sent to vendors for purchases. POs act as the primary control mechanism for corporate spending and inventory tracking."
    },
    {
      "name": "Expenses",
      "description": "Record, inspect, and manage tenant expenses, including line items, taxes, attributes, and supporting attachments."
    },
    {
      "name": "Accounting / Dimensions",
      "description": "Generally available accounting dimensions: manage tenant-owned definitions and values, classify transaction lines, report by dimension, and correct missing assignments. Dimensions remain optional; deployment availability and existing permissions apply."
    },
    {
      "name": "Accounting / Journals",
      "description": "### General Ledger & Journal Entries\n\nCreate, inspect, and correct the tenant's primary accounting records. Posted journals follow double-entry rules and retain their original audit evidence.\n\n* **Audit Trail:** Every entry generates a unique transaction hash.\n* **Versioning:** GET returns the current version plus a short version_history. Pass version to load one earlier version.\n* **Corrections:** Posted history is preserved; drafts can still be updated or deleted. Void reverses financial impact without deleting the original record."
    },
    {
      "name": "Accounting / Accounts",
      "description": "### Cash & Liquidity Management\n\nControl and reconciliation of bank accounts, petty cash, and credit lines. Use these endpoints to track real-time balances and synchronize external bank statements with the internal ledger."
    },
    {
      "name": "Accounting / Reconciliations",
      "description": "### Verification & Financial Integrity\n\nThe process of matching internal ledger records against external bank statements. This module ensures that the 'Book Balance' and 'Statement Balance' are synchronized.\n\n* **Discrepancy Control:** Automatically calculates the 'diff' to identify missing or erroneous transactions.\n* **Transaction Locking:** Finalizing a reconciliation locks the associated period, preventing retrospective changes to the audit trail.\n* **Adjustment Journals:** Supports the direct creation of balancing entries for bank charges or interest."
    },
    {
      "name": "Accounting / Transactions",
      "description": "### Ledger Ingestion & Categorization\n\nThe foundational layer of the general ledger, handling the intake of all financial movements from linked bank feeds and manual entries.\n\n* **Matching Engine:** Support for linking bank movements to existing Invoices, Bills, and Journal Entries to close the loop on accounts receivable/payable.\n* **Exclusion Logic:** Capabilities to 'Ignore' or 'Exclude' non-business movements or duplicates while maintaining a clear audit trail of the reason.\n* **Entity Mapping:** Allows for complex 'Many-to-Many' splits, where a single transaction can be allocated across multiple ledger entities."
    },
    {
      "name": "Configuration & Reference Data",
      "description": "### Global Configuration & Lookups\nRead-only endpoints for retrieving localized system data, currency conversions, and regional parameters."
    },
    {
      "name": "Taxes & Submissions",
      "description": "### Tax Configuration & Reporting\n\nThis module manages tax definitions, calculations, and regulatory reporting across the platform. It enables businesses to define applicable taxes, apply them to transactions, and generate structured tax reports for compliance.\n\n**Key Capabilities:**\n- Create and manage tax rates (e.g., GST, VAT, Sales Tax)\n- Support multiple tax types and categories (sale, purchase, etc.)\n- Configure recoverable vs non-recoverable taxes\n- Apply taxes dynamically to invoices, expenses, and transactions\n- Generate and submit tax reports\n- Track tax report submissions and their lifecycle\n\n**How It Works:**\nTaxes are defined at the company (tenant) level and linked to financial transactions. Each tax includes attributes such as rate, category, and recoverability.\n\nDuring transaction processing, applicable taxes are calculated and stored. These records are later aggregated into tax reports, which can be submitted and tracked via the reporting workflow.\n\n**Use Cases:**\n- Configure GST/VAT for invoices and expenses\n- Handle input/output tax tracking for compliance\n- Generate periodic tax reports (monthly, quarterly, etc.)\n- Maintain audit-ready tax submission records\n\n"
    },
    {
      "name": "Audit Activity",
      "description": "### Operational Audit Trail & Record History\n\nA high-fidelity registry of all system interactions and data mutations. This module provides a centralized, immutable timeline of 'Who, What, and When,' ensuring total transparency across the organization. It tracks the complete evolution of records—from initial creation to final archival—offering the forensic evidence required for internal oversight and regulatory compliance."
    },
    {
      "name": "Late Fees",
      "description": "### Invoice Late Fee Rules\nEndpoints for managing the penalty rules applied to overdue invoices. Use these APIs to define percentage-based or flat late fee policies, control activation, and retrieve the rules available to a company for document workflows."
    },
    {
      "name": "Projects & Timesheets",
      "description": "### Project Management\nEndpoints for managing projects, reusable tasks, and billable timesheets within the authenticated company. Use these APIs to maintain project work, log time, and retrieve invoice-ready time summaries."
    },
    {
      "name": "Financial Reports",
      "description": "Generate tenant financial statements and ledger reports from the same posted accounting records used by hosted and embedded reporting experiences."
    },
    {
      "name": "Data Export",
      "description": "Request, monitor, and download company data exports."
    },
    {
      "name": "Company / Currency FX",
      "description": "Manage custom exchange rate windows, inspect their change history, and return currencies to automatic rates."
    }
  ],
  "x-hyperlane-ref": "feature/dimensions-registry-one-call",
  "servers": [
    {
      "url": "https://api-sandbox.paprel.com",
      "description": "Sandbox"
    },
    {
      "url": "https://api.paprel.com",
      "description": "Production"
    }
  ]
}
