{
  "openapi": "3.1.1",
  "info": {
    "title": "Eternify Ledger API: Banking and payments",
    "version": "v1",
    "x-wire-version": "2026-08-31",
    "description": "Bank connections, statements, reconciliation and payments. The same operations the Eternify Ledger app and its connected AI tools use, over HTTPS and JSON. Send a key or an access token as a bearer token. Each operation is stable or beta: a stable operation changes only with 365 days' notice, a beta one with 30. Changes are listed in the changelog at https://www.eternifylabs.com/resources/developers/changelog.",
    "contact": {
      "name": "Eternify Labs developer resources",
      "url": "https://www.eternifylabs.com/resources/developers"
    }
  },
  "servers": [
    {
      "url": "https://api.eternifylabs.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "apiKey": []
    },
    {
      "oauth": []
    }
  ],
  "tags": [
    {
      "name": "banking-and-payments",
      "description": "Bank connections, statements, reconciliation and payments.",
      "x-display-name": "Banking and payments"
    }
  ],
  "paths": {
    "/v1/bank-accounts": {
      "get": {
        "operationId": "listBankAccounts",
        "summary": "Lists the bank accounts the ledger pays from.",
        "description": "Lists the bank accounts the ledger pays from. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "default": "BANK",
              "type": "string",
              "enum": [
                "BANK",
                "CARD",
                "STRIPE",
                "ANY"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          },
          {
            "name": "connectionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "notFedByQuickBooks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "notConnectionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListBankAccountsResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/bank-accounts/{financialAccountId}/originator-changes/{changeId}/evidence-read": {
      "post": {
        "operationId": "readOriginatorEvidence",
        "summary": "Reads the evidence an originator change arrived with.",
        "description": "Reads the evidence an originator change arrived with. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-eternify-read": true,
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "financialAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "changeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "read": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "documentKind": {
                              "type": "string",
                              "enum": [
                                "VOID_CHEQUE",
                                "BANK_LETTER",
                                "STATEMENT",
                                "OTHER"
                              ]
                            },
                            "holderNamePrinted": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "namesTheCompany": {
                              "type": "boolean"
                            },
                            "documentDate": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "legible": {
                              "type": "boolean"
                            },
                            "routing": {
                              "type": "string",
                              "enum": [
                                "AGREES",
                                "DIFFERS",
                                "NOT_FOUND"
                              ]
                            },
                            "originatorId": {
                              "type": "string",
                              "enum": [
                                "AGREES",
                                "NOT_FOUND"
                              ]
                            },
                            "accountsPrinted": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "holderName": {
                              "type": "string",
                              "enum": [
                                "AGREES",
                                "DIFFERS",
                                "NOT_FOUND"
                              ]
                            },
                            "promptVersion": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "documentKind",
                            "holderNamePrinted",
                            "namesTheCompany",
                            "documentDate",
                            "legible",
                            "routing",
                            "originatorId",
                            "accountsPrinted",
                            "holderName",
                            "promptVersion"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "why": {
                      "type": "string",
                      "enum": [
                        "NO_EVIDENCE",
                        "UNREADABLE",
                        "DISCLOSURE",
                        "BUDGET",
                        "PROVIDER",
                        "UNPARSABLE",
                        "REFUSED"
                      ]
                    }
                  },
                  "required": [
                    "read"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/bank-accounts/{financialAccountId}/originator-changes/{changeId}/reject": {
      "post": {
        "operationId": "rejectOriginatorChange",
        "summary": "Rejects a proposed change to bank account originator details.",
        "description": "Rejects a proposed change to bank account originator details. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "financialAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "changeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "evidenceRead": {
                    "default": "NOT_READ",
                    "type": "string",
                    "enum": [
                      "AGREES",
                      "DIFFERS",
                      "NOT_READ",
                      "NO_EVIDENCE"
                    ]
                  },
                  "evidenceReadPromptVersion": {
                    "type": "string",
                    "maxLength": 40
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListBankAccountsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/bank-accounts/{financialAccountId}/originator-changes/{changeId}/withdraw": {
      "post": {
        "operationId": "withdrawOriginatorChange",
        "summary": "Withdraws a proposed change to bank account originator details.",
        "description": "Withdraws a proposed change to bank account originator details. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "financialAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "changeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListBankAccountsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/bank-file-tests": {
      "get": {
        "operationId": "listBankFileTests",
        "summary": "Lists the test payment files sent to each bank and their verdicts.",
        "description": "Lists the test payment files sent to each bank and their verdicts. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "bankProfileId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "paymentRunId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "answer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "AWAITING",
                "ACCEPTED",
                "REJECTED"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListBankFileTestsResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/bank-file-tests/{testId}": {
      "get": {
        "operationId": "getBankFileTest",
        "summary": "Returns one bank file test with its verdict.",
        "description": "Returns one bank file test with its verdict. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "testId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListBankFileTestsResponseItem"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/bank-file-tests/{testId}/verdict": {
      "post": {
        "operationId": "recordBankFileVerdict",
        "summary": "Records the bank's verdict on a test payment file.",
        "description": "Records the bank's verdict on a test payment file. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "testId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "verdict": {
                    "type": "string",
                    "enum": [
                      "ACCEPTED",
                      "REJECTED"
                    ]
                  },
                  "portalReference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "portalText": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "note": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "evidenceDocumentId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "rejectedFields": {
                    "maxItems": 13,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Field"
                    }
                  },
                  "draft": {
                    "type": "object",
                    "properties": {
                      "promptVersion": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 60
                      },
                      "proposedOutcome": {
                        "type": "string",
                        "enum": [
                          "ACCEPTED",
                          "REJECTED",
                          "UNCLEAR"
                        ]
                      },
                      "groundedRejections": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "droppedQuotes": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "instructionFound": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "promptVersion",
                      "proposedOutcome",
                      "groundedRejections",
                      "droppedQuotes",
                      "instructionFound"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "verdict"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListBankFileTestsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/bank-file-tests/{testId}/verdict/draft": {
      "post": {
        "operationId": "draftBankFileVerdict",
        "summary": "Drafts the verdict on a bank file test for a person to confirm.",
        "description": "Drafts the verdict on a bank file test for a person to confirm. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-eternify-read": true,
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "testId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "documentId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "portalText": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "drafted": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "outcome": {
                              "type": "string",
                              "enum": [
                                "ACCEPTED",
                                "REJECTED",
                                "UNCLEAR"
                              ]
                            },
                            "portalReference": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "rejections": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "$ref": "#/components/schemas/Field"
                                  },
                                  "recordType": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "A",
                                          "C",
                                          "Z"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "bankCode": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "quote": {
                                    "type": "string"
                                  },
                                  "remedy": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "field",
                                  "recordType",
                                  "bankCode",
                                  "quote",
                                  "remedy"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "instructionFound": {
                              "type": "boolean"
                            },
                            "droppedQuotes": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "note": {
                              "type": "string"
                            },
                            "promptVersion": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "outcome",
                            "portalReference",
                            "rejections",
                            "instructionFound",
                            "droppedQuotes",
                            "note",
                            "promptVersion"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "why": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "NO_TEXT",
                            "UNREADABLE",
                            "DISCLOSURE",
                            "BUDGET",
                            "PROVIDER",
                            "UNPARSABLE",
                            "REFUSED"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "drafted",
                    "why"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/bank-profiles": {
      "get": {
        "operationId": "listBankProfiles",
        "summary": "Lists the bank profiles that describe how each bank's files are built.",
        "description": "Lists the bank profiles that describe how each bank's files are built. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListBankProfilesResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/bank-profiles/{profileId}": {
      "get": {
        "operationId": "getBankProfile",
        "summary": "Returns one bank profile with its file layout.",
        "description": "Returns one bank profile with its file layout. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListBankProfilesResponseItem"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/banking-changes": {
      "get": {
        "operationId": "listBankingChanges",
        "summary": "Lists the changes to vendor banking details across the ledger.",
        "description": "Lists the changes to vendor banking details across the ledger. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "show",
            "in": "query",
            "required": false,
            "schema": {
              "default": "verifiable",
              "type": "string",
              "enum": [
                "verifiable",
                "mine",
                "all"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "batch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "flag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "disagrees",
                "noPaper",
                "signals",
                "expiring"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "changeId": {
                            "type": "string"
                          },
                          "vendorId": {
                            "type": "string"
                          },
                          "vendorName": {
                            "type": "string"
                          },
                          "scheme": {
                            "type": "string",
                            "enum": [
                              "CA_EFT",
                              "IBAN",
                              "US_ABA",
                              "SWIFT_ACCOUNT"
                            ]
                          },
                          "bankCountry": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "proposedBy": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "proposedAt": {
                            "type": "string",
                            "minLength": 20
                          },
                          "expiresAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "source": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "HAND"
                                  }
                                },
                                "required": [
                                  "kind"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "BATCH"
                                  },
                                  "importId": {
                                    "type": "string"
                                  },
                                  "fileName": {
                                    "type": "string"
                                  },
                                  "line": {
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "kind",
                                  "importId",
                                  "fileName",
                                  "line"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "paper": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "documentId": {
                                    "type": "string"
                                  },
                                  "fileName": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "documentId",
                                  "fileName"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "intakeCheck": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "NOT_ASKED",
                                      "WAITING",
                                      "READ",
                                      "NOT_READ",
                                      "STALE"
                                    ]
                                  },
                                  "routing": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "AGREES",
                                          "DIFFERS",
                                          "NOT_FOUND"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "holderVsFile": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "AGREES",
                                          "DIFFERS",
                                          "NOT_FOUND"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "routing",
                                  "holderVsFile"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "signals": {
                            "type": "object",
                            "properties": {
                              "open": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "kinds": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "HOLDER_NAME_MISMATCH",
                                    "NO_EVIDENCE",
                                    "NEW_SENDER_DOMAIN",
                                    "CHANGE_BEFORE_A_LARGE_BILL",
                                    "SHORT_INTERVAL",
                                    "SHARED_ACCOUNT"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "open",
                              "kinds"
                            ],
                            "additionalProperties": false
                          },
                          "you": {
                            "type": "object",
                            "properties": {
                              "mayVerify": {
                                "type": "boolean"
                              },
                              "whyNot": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "OWN_PROPOSAL",
                                      "SAME_HAND",
                                      "COMPANY_SCOPE",
                                      "NO_SEAT"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "mayWithdraw": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "mayVerify",
                              "whyNot",
                              "mayWithdraw"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "changeId",
                          "vendorId",
                          "vendorName",
                          "scheme",
                          "bankCountry",
                          "proposedBy",
                          "proposedAt",
                          "expiresAt",
                          "source",
                          "paper",
                          "intakeCheck",
                          "signals",
                          "you"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "entityTimeZone": {
                      "type": "string"
                    },
                    "bankingCallbackWindowDays": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total",
                    "entityTimeZone",
                    "bankingCallbackWindowDays"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/banking-minimisations": {
      "get": {
        "operationId": "listBankingMinimisations",
        "summary": "Lists the banking details minimised on the ledger.",
        "description": "Lists the banking details minimised on the ledger. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "vendorId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "REJECTED",
                "WITHDRAWN",
                "EXPIRED",
                "SUPERSEDED_UNPAID",
                "PERMISSION_RECORDED"
              ]
            }
          },
          {
            "name": "changeIds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 12800
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "changeId": {
                            "type": "string"
                          },
                          "vendor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "displayName"
                            ],
                            "additionalProperties": false
                          },
                          "scheme": {
                            "type": "string"
                          },
                          "bankCountry": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "REJECTED",
                              "WITHDRAWN",
                              "EXPIRED",
                              "SUPERSEDED_UNPAID",
                              "PERMISSION_RECORDED"
                            ]
                          },
                          "basis": {
                            "type": "string",
                            "enum": [
                              "RETENTION_RULE",
                              "CRA_PERMISSION"
                            ]
                          },
                          "proposedAt": {
                            "type": "string",
                            "minLength": 20
                          },
                          "decidedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "destroyedAt": {
                            "type": "string",
                            "minLength": 20
                          },
                          "requestId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "entityTimeZone": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "changeId",
                          "vendor",
                          "scheme",
                          "bankCountry",
                          "reason",
                          "basis",
                          "proposedAt",
                          "decidedAt",
                          "destroyedAt",
                          "requestId",
                          "entityTimeZone"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/expected-clearings": {
      "get": {
        "operationId": "listExpectedClearings",
        "summary": "Lists the expected clearings the ledger is waiting on.",
        "description": "Lists the expected clearings the ledger is waiting on. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "EXPECTED",
                "LATE",
                "CLEARED",
                "WITHDRAWN"
              ]
            }
          },
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "financialAccountId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "paymentRunId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "sourceKind": {
                            "type": "string",
                            "enum": [
                              "PAYMENT_RUN",
                              "RUN_PAYMENT"
                            ]
                          },
                          "paymentRunId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "runLabel": {
                            "type": "string"
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "entityTimeZone": {
                            "type": "string"
                          },
                          "financialAccount": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              },
                              "hasFeed": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "id",
                              "displayName",
                              "hasFeed"
                            ],
                            "additionalProperties": false
                          },
                          "expectedOn": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "windowFrom": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "windowTo": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "amountMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                          },
                          "reference": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "lineCount": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 9007199254740991
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "OPEN",
                              "MATCHED",
                              "WITHDRAWN"
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "EXPECTED",
                              "LATE",
                              "CLEARED",
                              "WITHDRAWN"
                            ]
                          },
                          "statementThrough": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "matchedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "matchedBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "matchedBankLine": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "postedOn": {
                                    "type": "string",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                  },
                                  "description": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "postedOn",
                                  "description"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "withdrawnAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "withdrawnBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "withdrawnCause": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "RUN_REVERSED",
                                  "BANK_REJECTED",
                                  "PAYMENT_REVERSED"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "backfilled": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "minLength": 20
                          }
                        },
                        "required": [
                          "id",
                          "sourceKind",
                          "paymentRunId",
                          "paymentId",
                          "runLabel",
                          "entityId",
                          "entityName",
                          "entityTimeZone",
                          "financialAccount",
                          "expectedOn",
                          "windowFrom",
                          "windowTo",
                          "amountMinor",
                          "currency",
                          "reference",
                          "lineCount",
                          "status",
                          "state",
                          "statementThrough",
                          "matchedAt",
                          "matchedBy",
                          "matchedBankLine",
                          "withdrawnAt",
                          "withdrawnBy",
                          "withdrawnCause",
                          "backfilled",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/feed-account-suggestions/{suggestionId}/decline": {
      "post": {
        "operationId": "declineFeedAccountSuggestion",
        "summary": "Declines a suggested account for a connection's feed.",
        "description": "Declines a suggested account for a connection's feed. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "suggestionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuggestFeedAccountResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/financial-accounts/registrable": {
      "get": {
        "operationId": "listRegistrableConnections",
        "summary": "Lists the bank connections that can be registered as financial accounts.",
        "description": "Lists the bank connections that can be registered as financial accounts. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "connections": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "connectionId": {
                            "type": "string"
                          },
                          "connectionName": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string"
                          },
                          "stagedLineCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "statementCurrencies": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "currency": {
                                  "type": "string"
                                },
                                "lineCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "currency",
                                "lineCount"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "registeredCurrencies": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "stagedKinds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "connectionId",
                          "connectionName",
                          "provider",
                          "stagedLineCount",
                          "statementCurrencies",
                          "registeredCurrencies",
                          "stagedKinds"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "truncated": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "connections",
                    "total",
                    "truncated"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/originator-changes": {
      "get": {
        "operationId": "listOriginatorChanges",
        "summary": "Lists the proposed changes to bank account originator details.",
        "description": "Lists the proposed changes to bank account originator details. Needs the `ledger:read-sensitive` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read-sensitive",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "financialAccountId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "PROPOSED",
                "VERIFIED",
                "REJECTED",
                "WITHDRAWN"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "financialAccountId": {
                            "type": "string"
                          },
                          "accountName": {
                            "type": "string"
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "entityTimeZone": {
                            "type": "string"
                          },
                          "originatorId": {
                            "type": "string"
                          },
                          "shortName": {
                            "type": "string"
                          },
                          "longName": {
                            "type": "string"
                          },
                          "destinationDataCentre": {
                            "type": "string"
                          },
                          "carriedOver": {
                            "type": "boolean"
                          },
                          "evidence": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "documentId": {
                                    "type": "string"
                                  },
                                  "fileName": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "documentId",
                                  "fileName"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "proposedBy": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "proposedAt": {
                            "type": "string",
                            "minLength": 20
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "PROPOSED",
                              "VERIFIED",
                              "REJECTED",
                              "WITHDRAWN"
                            ]
                          },
                          "decidedBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "decidedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "verificationMethod": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "CALLBACK_KNOWN_NUMBER",
                                  "IN_PERSON",
                                  "OTHER"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "decisionNote": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "financialAccountId",
                          "accountName",
                          "entityId",
                          "entityName",
                          "entityTimeZone",
                          "originatorId",
                          "shortName",
                          "longName",
                          "destinationDataCentre",
                          "carriedOver",
                          "evidence",
                          "proposedBy",
                          "proposedAt",
                          "status",
                          "decidedBy",
                          "decidedAt",
                          "verificationMethod",
                          "decisionNote"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-plans": {
      "post": {
        "operationId": "createPaymentPlan",
        "summary": "Proposes a payment plan for a bill or a set of bills.",
        "description": "Proposes a payment plan for a bill or a set of bills. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "financialAccountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "window": {
                    "$ref": "#/components/schemas/WindowOption1"
                  },
                  "keepMinor": {
                    "default": "0",
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  "constraints": {
                    "type": "object",
                    "properties": {
                      "notBefore": {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "vendorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "on": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            }
                          },
                          "required": [
                            "vendorId",
                            "on"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "leaveOut": {
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "vendorId": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "vendorId"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "includeDeclined": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "notBefore",
                      "leaveOut",
                      "includeDeclined"
                    ],
                    "additionalProperties": false
                  },
                  "readBy": {
                    "default": "FORM",
                    "type": "string",
                    "enum": [
                      "FORM",
                      "PRODUCT",
                      "MODEL"
                    ]
                  },
                  "promptVersion": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  }
                },
                "required": [
                  "entityId",
                  "financialAccountId",
                  "window",
                  "constraints"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePaymentPlanResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-plans/read-sentence": {
      "post": {
        "operationId": "readPaymentPlanSentence",
        "summary": "Reads the sentence that describes a payment plan.",
        "description": "Reads the sentence that describes a payment plan. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-eternify-read": true,
        "x-scope": "ledger:propose",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sentence": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 300
                  }
                },
                "required": [
                  "entityId",
                  "sentence"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "drafted": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "readBy": {
                              "type": "string",
                              "enum": [
                                "PRODUCT",
                                "MODEL"
                              ]
                            },
                            "promptVersion": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "window": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/WindowOption1"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "keepMinor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^-?\\d+$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "notBefore": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "phrase": {
                                    "type": "string"
                                  },
                                  "vendor": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "displayName": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "displayName"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "on": {
                                    "type": "string",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                  }
                                },
                                "required": [
                                  "phrase",
                                  "vendor",
                                  "on"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "leaveOut": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "phrase": {
                                    "type": "string"
                                  },
                                  "vendor": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "displayName": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "displayName"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "phrase",
                                  "vendor"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "includeDeclined": {
                              "type": "boolean"
                            },
                            "adjusted": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string"
                                  },
                                  "sentence": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "field",
                                  "sentence"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "quote": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "readBy",
                            "promptVersion",
                            "window",
                            "keepMinor",
                            "notBefore",
                            "leaveOut",
                            "includeDeclined",
                            "adjusted",
                            "quote"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "why": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "DISCLOSURE",
                            "BUDGET",
                            "PROVIDER",
                            "MODEL_FAILED",
                            "NOT_A_PLAN",
                            "NOT_FROM_SENTENCE",
                            "FIGURE_NOT_IN_SENTENCE",
                            "TWO_WINDOWS",
                            "READING_BUSY"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "drafted",
                    "why"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-plans/{planId}": {
      "get": {
        "operationId": "getPaymentPlan",
        "summary": "Returns one payment plan with its status.",
        "description": "Returns one payment plan with its status. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePaymentPlanResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-plans/{planId}/decide": {
      "post": {
        "operationId": "decidePaymentPlan",
        "summary": "Accepts or declines a proposed payment plan.",
        "description": "Accepts or declines a proposed payment plan. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lines": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "lineId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "decision": {
                          "type": "string",
                          "enum": [
                            "APPLY",
                            "DECLINE"
                          ]
                        },
                        "on": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        "declineClass": {
                          "type": "string",
                          "enum": [
                            "NOT_NOW",
                            "DISPUTED",
                            "PAID_OTHER_WAY",
                            "OTHER"
                          ]
                        },
                        "note": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        }
                      },
                      "required": [
                        "lineId",
                        "decision"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "lines"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePaymentPlanResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-return-files": {
      "get": {
        "operationId": "listPaymentReturnFiles",
        "summary": "Lists the bank return files that were read, newest first.",
        "description": "Lists the bank return files that were read, newest first. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "runId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "documentId": {
                            "type": "string"
                          },
                          "fileName": {
                            "type": "string"
                          },
                          "sha256": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$"
                          },
                          "scopeRunId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                          },
                          "fileCreationNumber": {
                            "type": "string"
                          },
                          "fileCreatedOn": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "returnedOn": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "recordCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "itemCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "totalMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "matchedCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "unmatchedCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "openProposalCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "hiddenItemCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "uploadedBy": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "uploadedAt": {
                            "type": "string",
                            "minLength": 20
                          }
                        },
                        "required": [
                          "id",
                          "documentId",
                          "fileName",
                          "sha256",
                          "scopeRunId",
                          "currency",
                          "fileCreationNumber",
                          "fileCreatedOn",
                          "returnedOn",
                          "recordCount",
                          "itemCount",
                          "totalMinor",
                          "matchedCount",
                          "unmatchedCount",
                          "openProposalCount",
                          "hiddenItemCount",
                          "uploadedBy",
                          "uploadedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-return-proposals": {
      "get": {
        "operationId": "listPaymentReturnProposals",
        "summary": "Lists the returned payments waiting for a person, or already decided.",
        "description": "Lists the returned payments waiting for a person, or already decided. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "runId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "PROPOSED",
                "CONFIRMED",
                "DISMISSED",
                "SUPERSEDED"
              ]
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "BANK_FILE",
                "RAIL"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListPaymentReturnProposalsResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "oldestProposedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 20
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total",
                    "oldestProposedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-return-proposals/{returnProposalId}/confirm": {
      "post": {
        "operationId": "confirmPaymentReturn",
        "summary": "Confirms a proposed return, which reverses the payment and puts its bills back to be paid.",
        "description": "Confirms a proposed return, which reverses the payment and puts its bills back to be paid. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "returnProposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnedOn": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPaymentReturnProposalsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-return-proposals/{returnProposalId}/dismiss": {
      "post": {
        "operationId": "dismissPaymentReturn",
        "summary": "Dismisses a proposed return with a reason, leaving the payment as it stands.",
        "description": "Dismisses a proposed return with a reason, leaving the payment as it stands. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "returnProposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "note": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "note"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPaymentReturnProposalsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs": {
      "get": {
        "operationId": "listPaymentRuns",
        "summary": "Lists the payment runs, newest first, with the server's total.",
        "description": "Lists the payment runs, newest first, with the server's total. Needs the `ledger:read` permission. Stable: a change that breaks callers needs 365 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "stable",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "RELEASED",
                "PARTLY_REVERSED",
                "REVERSED",
                "CANCELLED"
              ]
            }
          },
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "awaiting",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "myRelease"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "EFT",
                "CHEQUE",
                "WIRE"
              ]
            }
          },
          {
            "name": "bank",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "NOT_LODGED",
                "AWAITING_BANK",
                "ACCEPTED",
                "REJECTED"
              ]
            }
          },
          {
            "name": "cleared",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "NOT_CLEARED",
                "CLEARED",
                "WITHDRAWN"
              ]
            }
          },
          {
            "name": "preparedBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "PERSON",
                "POLICY"
              ]
            }
          },
          {
            "name": "rail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "FILE",
                "ZUMRAILS"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "DRAFT",
                              "RELEASED",
                              "CANCELLED"
                            ]
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "entityTimeZone": {
                            "type": "string"
                          },
                          "bankAccount": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "displayName"
                            ],
                            "additionalProperties": false
                          },
                          "paymentDate": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                          },
                          "totalMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "paymentCount": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 9007199254740991
                          },
                          "preparedBy": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "preparedAt": {
                            "type": "string",
                            "minLength": 20
                          },
                          "releasedBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "releasedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cancelledBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cancelledAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cancelReason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "reversalState": {
                            "type": "string",
                            "enum": [
                              "NONE",
                              "PARTLY_REVERSED",
                              "REVERSED"
                            ]
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "EFT",
                              "CHEQUE",
                              "WIRE"
                            ]
                          },
                          "bankState": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "NOT_LODGED",
                                  "AWAITING_BANK",
                                  "ACCEPTED",
                                  "REJECTED"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "entityId",
                          "entityName",
                          "entityTimeZone",
                          "bankAccount",
                          "paymentDate",
                          "currency",
                          "totalMinor",
                          "paymentCount",
                          "preparedBy",
                          "preparedAt",
                          "releasedBy",
                          "releasedAt",
                          "cancelledBy",
                          "cancelledAt",
                          "cancelReason",
                          "reversalState",
                          "method",
                          "bankState"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "preparePaymentRun",
        "summary": "Prepares a payment run from the bills that are due.",
        "description": "Prepares a payment run from the bills that are due. Needs the `ledger:propose` permission. Stable: a change that breaks callers needs 365 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "stable",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "financialAccountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "paymentDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "method": {
                    "default": "EFT",
                    "type": "string",
                    "enum": [
                      "EFT",
                      "CHEQUE",
                      "WIRE"
                    ]
                  },
                  "bills": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "billId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "payMinor": {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        "shortReason": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "shortReasonSource": {
                          "type": "string",
                          "enum": [
                            "PERSON",
                            "DRAFT",
                            "DRAFT_EDITED"
                          ]
                        },
                        "shortReasonPromptVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "declineDiscountReason": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "credits": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "vendorCreditId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "amountMinor": {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              }
                            },
                            "required": [
                              "vendorCreditId",
                              "amountMinor"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "billId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "billIds": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "entityId",
                  "financialAccountId",
                  "paymentDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreparePaymentRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/bulk/cancel": {
      "post": {
        "operationId": "bulkCancelPaymentRuns",
        "summary": "Cancels several payment runs in one request.",
        "description": "Cancels several payment runs in one request. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkHoldVendorPaymentsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkHoldVendorPaymentsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}": {
      "get": {
        "operationId": "getPaymentRun",
        "summary": "Returns one payment run with its payments and status.",
        "description": "Returns one payment run with its payments and status. Needs the `ledger:read` permission. Stable: a change that breaks callers needs 365 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "stable",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreparePaymentRunResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}/bank-notices/read": {
      "post": {
        "operationId": "readBankNotice",
        "summary": "Reads the bank notice that came back for a payment run.",
        "description": "Reads the bank notice that came back for a payment run. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-eternify-read": true,
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "documentId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 6000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reading": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "FILE_ACCEPTED",
                                "FILE_REJECTED",
                                "PAYMENTS_RETURNED",
                                "NOT_A_BANK_NOTICE"
                              ]
                            },
                            "noticeDate": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "bankReference": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "fileReasonQuote": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "fileNumberPrinted": {
                              "type": "boolean"
                            },
                            "returns": {
                              "maxItems": 20,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "returnCode": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "R900",
                                          "R902",
                                          "R903",
                                          "R904",
                                          "R905",
                                          "R909",
                                          "R910",
                                          "R911",
                                          "R912",
                                          "R922",
                                          "R990",
                                          "OTHER"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "codeSource": {
                                    "type": "string",
                                    "enum": [
                                      "PRINTED",
                                      "WORDS",
                                      "DISAGREES"
                                    ]
                                  },
                                  "quote": {
                                    "type": "string"
                                  },
                                  "match": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "paymentId": {
                                            "type": "string"
                                          },
                                          "sequence": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 9007199254740991
                                          },
                                          "vendorName": {
                                            "type": "string"
                                          },
                                          "amountMinor": {
                                            "type": "string",
                                            "pattern": "^-?\\d+$"
                                          },
                                          "currency": {
                                            "type": "string",
                                            "pattern": "^[A-Z]{3}$"
                                          },
                                          "amountAgrees": {
                                            "type": [
                                              "boolean",
                                              "null"
                                            ]
                                          },
                                          "matchedOn": {
                                            "type": "string",
                                            "enum": [
                                              "CROSS_REFERENCE",
                                              "PAYEE_NAME",
                                              "VENDOR_NAME"
                                            ]
                                          },
                                          "alreadyReversed": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "paymentId",
                                          "sequence",
                                          "vendorName",
                                          "amountMinor",
                                          "currency",
                                          "amountAgrees",
                                          "matchedOn",
                                          "alreadyReversed"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "candidates": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "returnCode",
                                  "codeSource",
                                  "quote",
                                  "match",
                                  "candidates"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "quote": {
                              "type": "string"
                            },
                            "note": {
                              "type": "string"
                            },
                            "documentChars": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "sentChars": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "promptVersion": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "noticeDate",
                            "bankReference",
                            "fileReasonQuote",
                            "fileNumberPrinted",
                            "returns",
                            "quote",
                            "note",
                            "documentChars",
                            "sentChars",
                            "promptVersion"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "why": {
                      "type": "string",
                      "enum": [
                        "NOT_RELEASED",
                        "NO_TEXT",
                        "RETURN_FILE",
                        "UNREADABLE",
                        "DISCLOSURE",
                        "BUDGET",
                        "PROVIDER",
                        "REFUSED",
                        "UNPARSABLE",
                        "QUOTE_NOT_IN_TEXT"
                      ]
                    }
                  },
                  "required": [
                    "reading"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}/brief": {
      "get": {
        "operationId": "getPaymentRunBrief",
        "summary": "Returns the brief a person reads before releasing a payment run.",
        "description": "Returns the brief a person reads before releasing a payment run. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "runId": {
                      "type": "string"
                    },
                    "readAt": {
                      "type": "string",
                      "minLength": 20
                    },
                    "entityId": {
                      "type": "string"
                    },
                    "entityName": {
                      "type": "string"
                    },
                    "entityTimeZone": {
                      "type": "string"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "EFT",
                        "CHEQUE",
                        "WIRE"
                      ]
                    },
                    "paymentDate": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "paymentCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "totals": {
                      "type": "object",
                      "properties": {
                        "totalMinor": {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "functionalTotalMinor": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^-?\\d+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "functionalCurrency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "account": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "displayName": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "displayName"
                          ],
                          "additionalProperties": false
                        },
                        "bookBalanceMinor": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^-?\\d+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "balanceOn": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        "shortByMinor": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^-?\\d+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "totalMinor",
                        "currency",
                        "functionalTotalMinor",
                        "functionalCurrency",
                        "account",
                        "bookBalanceMinor",
                        "balanceOn",
                        "shortByMinor"
                      ],
                      "additionalProperties": false
                    },
                    "newPayees": {
                      "$ref": "#/components/schemas/NewPayees"
                    },
                    "aboveHistoricalMax": {
                      "$ref": "#/components/schemas/NewPayees"
                    },
                    "recentBanking": {
                      "maxItems": 500,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "paymentId": {
                            "type": "string"
                          },
                          "sequence": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "vendor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "displayName"
                            ],
                            "additionalProperties": false
                          },
                          "verifiedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "verifiedBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "daysBeforePayment": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "windowDays": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "signals": {
                            "$ref": "#/components/schemas/BankingSignals"
                          }
                        },
                        "required": [
                          "paymentId",
                          "sequence",
                          "vendor",
                          "verifiedAt",
                          "verifiedBy",
                          "daysBeforePayment",
                          "windowDays",
                          "signals"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "billFindings": {
                      "maxItems": 500,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "paymentId": {
                            "type": "string"
                          },
                          "vendor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "displayName"
                            ],
                            "additionalProperties": false
                          },
                          "billId": {
                            "type": "string"
                          },
                          "number": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "supplierName": {
                            "type": "string"
                          },
                          "warnings": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "severity": {
                                  "type": "string",
                                  "enum": [
                                    "WARNING",
                                    "BLOCKING"
                                  ]
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "code",
                                "severity",
                                "message"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "creditSupport": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "FAILS",
                                  "UNTESTED"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "openSignals": {
                            "$ref": "#/components/schemas/BankingSignals"
                          }
                        },
                        "required": [
                          "paymentId",
                          "vendor",
                          "billId",
                          "number",
                          "supplierName",
                          "warnings",
                          "creditSupport",
                          "openSignals"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "vendorStates": {
                      "maxItems": 500,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "paymentId": {
                            "type": "string"
                          },
                          "vendor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "displayName"
                            ],
                            "additionalProperties": false
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "HELD",
                              "PENDING_ACCEPTANCE",
                              "REFUSED",
                              "NOT_REVIEWED"
                            ]
                          },
                          "blocksRelease": {
                            "type": "boolean"
                          },
                          "since": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "by": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "paymentId",
                          "vendor",
                          "state",
                          "blocksRelease",
                          "since",
                          "by",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "deductions": {
                      "maxItems": 500,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "paymentId": {
                            "type": "string"
                          },
                          "vendor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "displayName"
                            ],
                            "additionalProperties": false
                          },
                          "billId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "number": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "owedMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "paidMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "appliedMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "shortReason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "deductions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "CREDIT",
                                    "DISCOUNT",
                                    "WITHHOLDING"
                                  ]
                                },
                                "amountMinor": {
                                  "type": "string",
                                  "pattern": "^-?\\d+$"
                                },
                                "reason": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "amountMinor",
                                "reason"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "paymentId",
                          "vendor",
                          "billId",
                          "number",
                          "owedMinor",
                          "paidMinor",
                          "appliedMinor",
                          "shortReason",
                          "deductions"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "bankPrints": {
                      "maxItems": 500,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "paymentId": {
                            "type": "string"
                          },
                          "sequence": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "vendor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "displayName"
                            ],
                            "additionalProperties": false
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "EFT",
                              "CHEQUE",
                              "WIRE"
                            ]
                          },
                          "crossReference": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sundry": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "payeeName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "fileSequence": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "paymentId",
                          "sequence",
                          "vendor",
                          "kind",
                          "crossReference",
                          "sundry",
                          "payeeName",
                          "fileSequence"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "sinceLastRelease": {
                      "type": "object",
                      "properties": {
                        "last": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "runId": {
                                  "type": "string"
                                },
                                "paymentDate": {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "releasedAt": {
                                  "type": "string",
                                  "minLength": 20
                                },
                                "totalMinor": {
                                  "type": "string",
                                  "pattern": "^-?\\d+$"
                                },
                                "currency": {
                                  "type": "string",
                                  "pattern": "^[A-Z]{3}$"
                                },
                                "paymentCount": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "runId",
                                "paymentDate",
                                "releasedAt",
                                "totalMinor",
                                "currency",
                                "paymentCount"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "changes": {
                          "maxItems": 500,
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "BANKING_VERIFIED"
                                  },
                                  "vendor": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "displayName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "displayName"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "at": {
                                    "type": "string",
                                    "minLength": 20
                                  },
                                  "by": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "kind",
                                  "vendor",
                                  "at",
                                  "by"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "SIGNAL_RAISED"
                                  },
                                  "subject": {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "vendor",
                                          "bill"
                                        ]
                                      },
                                      "id": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "id",
                                      "label"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "signal": {
                                    "$ref": "#/components/schemas/StoredOption1"
                                  },
                                  "at": {
                                    "type": "string",
                                    "minLength": 20
                                  }
                                },
                                "required": [
                                  "kind",
                                  "subject",
                                  "signal",
                                  "at"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "AUTHORITY_CHANGED"
                                  },
                                  "at": {
                                    "type": "string",
                                    "minLength": 20
                                  },
                                  "by": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "capMinor": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^-?\\d+$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "currency": {
                                    "type": "string",
                                    "pattern": "^[A-Z]{3}$"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "at",
                                  "by",
                                  "capMinor",
                                  "currency"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "ORIGINATOR_CHANGED"
                                  },
                                  "at": {
                                    "type": "string",
                                    "minLength": 20
                                  },
                                  "by": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "account": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "displayName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "displayName"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "kind",
                                  "at",
                                  "by",
                                  "account"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "last",
                        "changes"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "runId",
                    "readAt",
                    "entityId",
                    "entityName",
                    "entityTimeZone",
                    "method",
                    "paymentDate",
                    "paymentCount",
                    "totals",
                    "newPayees",
                    "aboveHistoricalMax",
                    "recentBanking",
                    "billFindings",
                    "vendorStates",
                    "deductions",
                    "bankPrints",
                    "sinceLastRelease"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}/cancel": {
      "post": {
        "operationId": "cancelPaymentRun",
        "summary": "Cancels a payment run that has not been released.",
        "description": "Cancels a payment run that has not been released. Needs the `ledger:propose` permission. Stable: a change that breaks callers needs 365 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "stable",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreparePaymentRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}/notices": {
      "get": {
        "operationId": "listRunRemittance",
        "summary": "Lists the remittance advices of a payment run.",
        "description": "Lists the remittance advices of a payment run. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/State"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "paymentId": {
                            "type": "string"
                          },
                          "sequence": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 9007199254740991
                          },
                          "vendor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "displayName"
                            ],
                            "additionalProperties": false
                          },
                          "amountMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                          },
                          "entryStatus": {
                            "type": "string"
                          },
                          "state": {
                            "$ref": "#/components/schemas/State"
                          },
                          "recipient": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "email": {
                                    "type": "string"
                                  },
                                  "contactName": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "email",
                                  "contactName"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "advice": {
                            "$ref": "#/components/schemas/Advice"
                          },
                          "reversal": {
                            "$ref": "#/components/schemas/Advice"
                          },
                          "hasDeductions": {
                            "type": "boolean"
                          },
                          "addressSetBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "needsSecondPerson": {
                            "type": "boolean"
                          },
                          "requested": {
                            "$ref": "#/components/schemas/StoppedBy"
                          },
                          "lastDiscard": {
                            "$ref": "#/components/schemas/Retired"
                          },
                          "sentence": {
                            "type": "string"
                          },
                          "paragraphEvidence": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "lines": {
                                    "$ref": "#/components/schemas/Lines"
                                  },
                                  "standardParagraph": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "lines",
                                  "standardParagraph"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "paymentId",
                          "sequence",
                          "vendor",
                          "amountMinor",
                          "currency",
                          "entryStatus",
                          "state",
                          "recipient",
                          "advice",
                          "reversal",
                          "hasDeductions",
                          "addressSetBy",
                          "needsSecondPerson",
                          "requested",
                          "lastDiscard",
                          "sentence",
                          "paragraphEvidence"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "counts": {
                      "type": "object",
                      "propertyNames": {
                        "$ref": "#/components/schemas/State"
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "required": [
                        "NO_CONTACT_ON_RECORD",
                        "NOT_DRAFTED",
                        "TO_SEND",
                        "NEEDS_SECOND_PERSON",
                        "NOT_SENDABLE",
                        "ON_ITS_WAY",
                        "NOT_SENT_GAVE_UP",
                        "SENT",
                        "BOUNCED",
                        "DISCARDED",
                        "REVERSAL_TO_SEND",
                        "REVERSAL_SENT"
                      ]
                    },
                    "entityTimeZone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total",
                    "counts",
                    "entityTimeZone"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "draftRemittanceAdvices",
        "summary": "Drafts the remittance advices for a payment run.",
        "description": "Drafts the remittance advices for a payment run. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "paymentIds": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "replaceNoticeId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "replaceReason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "paragraph": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 600
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "STANDARD",
                          "PERSON",
                          "AGENT_DRAFT",
                          "AGENT_DRAFT_EDITED"
                        ]
                      },
                      "promptVersion": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 60
                      }
                    },
                    "required": [
                      "text",
                      "source"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "drafted": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "skipped": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "paymentId": {
                            "type": "string"
                          },
                          "vendor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "displayName"
                            ],
                            "additionalProperties": false
                          },
                          "why": {
                            "type": "string",
                            "enum": [
                              "NO_CONTACT_ON_RECORD",
                              "ALREADY_LIVE",
                              "PAYMENT_REVERSED"
                            ]
                          }
                        },
                        "required": [
                          "paymentId",
                          "vendor",
                          "why"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "drafted",
                    "skipped"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}/notices/send": {
      "post": {
        "operationId": "sendRemittanceAdvices",
        "summary": "Sends the remittance advices of a payment run to the vendors.",
        "description": "Sends the remittance advices of a payment run to the vendors. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "noticeIds": {
                    "minItems": 1,
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requested": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "alreadySent": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "held": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "noticeId": {
                            "type": "string"
                          },
                          "vendor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "displayName"
                            ],
                            "additionalProperties": false
                          },
                          "why": {
                            "type": "string",
                            "enum": [
                              "NEEDS_SECOND_PERSON",
                              "NO_NAMED_CONTACT",
                              "RECIPIENT_CHANGED",
                              "RECIPIENT_STOPPED",
                              "RECIPIENT_BOUNCED",
                              "ALREADY_ASKED",
                              "NOT_DRAFTED"
                            ]
                          },
                          "sentence": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "noticeId",
                          "vendor",
                          "why",
                          "sentence"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "requested",
                    "alreadySent",
                    "held"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}/notices/{noticeId}/paragraph": {
      "post": {
        "operationId": "draftRemittanceParagraph",
        "summary": "Drafts the paragraph a remittance advice carries for one payment.",
        "description": "Drafts the paragraph a remittance advice carries for one payment. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-eternify-read": true,
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "noticeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "note": {
                    "default": "",
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "drafted": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "why": {
                      "type": "string",
                      "enum": [
                        "DISCLOSURE",
                        "BUDGET",
                        "PROVIDER",
                        "UNPARSABLE",
                        "REFUSED",
                        "FIGURE_INVENTED",
                        "CONTACT_DETAIL",
                        "BANKING_WORDS",
                        "PROMISE",
                        "PAUSED_AFTER_THREE_UNUSED"
                      ]
                    },
                    "promptVersion": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "resumesOn": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    }
                  },
                  "required": [
                    "drafted",
                    "promptVersion"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}/payments/{paymentId}/remove": {
      "post": {
        "operationId": "removeRunPayment",
        "summary": "Removes one payment from a payment run before it is released.",
        "description": "Removes one payment from a payment run before it is released. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "decline": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "TOO_MUCH",
                          "TOO_EARLY",
                          "WRONG_SUPPLIER",
                          "OTHER"
                        ]
                      },
                      "suggestion": {
                        "$ref": "#/components/schemas/Suggestion"
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreparePaymentRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}/payments/{paymentId}/reverse": {
      "post": {
        "operationId": "reversePayment",
        "summary": "Reverses one payment in a released payment run.",
        "description": "Reverses one payment in a released payment run. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnCode": {
                    "type": "string",
                    "enum": [
                      "R900",
                      "R902",
                      "R903",
                      "R904",
                      "R905",
                      "R909",
                      "R910",
                      "R911",
                      "R912",
                      "R922",
                      "R990",
                      "OTHER"
                    ]
                  },
                  "note": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "returnedOn": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "evidenceDocumentId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "reading": {
                    "default": "NOT_READ",
                    "type": "string",
                    "enum": [
                      "NOT_READ",
                      "AGREES",
                      "DIFFERS"
                    ]
                  },
                  "readingPromptVersion": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  }
                },
                "required": [
                  "returnCode",
                  "returnedOn"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreparePaymentRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}/rail": {
      "get": {
        "operationId": "getPaymentRunRail",
        "summary": "Reads the Zūm Rails payouts of a payment run, one page at a time.",
        "description": "Reads the Zūm Rails payouts of a payment run, one page at a time. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "paymentId": {
                            "type": "string"
                          },
                          "sequence": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 9007199254740991
                          },
                          "vendor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "displayName": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "displayName"
                            ],
                            "additionalProperties": false
                          },
                          "amountMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "currency": {
                            "type": "string",
                            "const": "CAD"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "QUEUED",
                              "SUBMITTED",
                              "SETTLED",
                              "FAILED",
                              "RETURNED"
                            ]
                          },
                          "providerStatus": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "reasonCode": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "reasonWords": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 300
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "mappedReturnCode": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "R900",
                                  "R902",
                                  "R903",
                                  "R904",
                                  "R905",
                                  "R909",
                                  "R910",
                                  "R911",
                                  "R912",
                                  "R922",
                                  "R990",
                                  "OTHER"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "feeMinor": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "submittedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "settledAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "failedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "returnedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lastEventAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "attempts": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 12
                          }
                        },
                        "required": [
                          "id",
                          "paymentId",
                          "sequence",
                          "vendor",
                          "amountMinor",
                          "currency",
                          "status",
                          "providerStatus",
                          "reasonCode",
                          "reasonWords",
                          "mappedReturnCode",
                          "feeMinor",
                          "submittedAt",
                          "settledAt",
                          "failedAt",
                          "returnedAt",
                          "lastEventAt",
                          "attempts"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dispatch": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "dispatchedBy": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "dispatchedAt": {
                          "type": "string",
                          "minLength": 20
                        },
                        "environment": {
                          "type": "string",
                          "enum": [
                            "SANDBOX",
                            "PRODUCTION"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "FAILED",
                            "PARTLY_FAILED",
                            "SENDING",
                            "IN_PROGRESS",
                            "SETTLED"
                          ]
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "queued": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "submitted": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "settled": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "failed": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "returned": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "queued",
                            "submitted",
                            "settled",
                            "failed",
                            "returned"
                          ],
                          "additionalProperties": false
                        },
                        "totalMinor": {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        "paymentCount": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "connection": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "displayName": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "displayName"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "dispatchedBy",
                        "dispatchedAt",
                        "environment",
                        "state",
                        "counts",
                        "totalMinor",
                        "paymentCount",
                        "connection"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total",
                    "dispatch"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}/rail-stop": {
      "post": {
        "operationId": "stopRailPayouts",
        "summary": "Stops the payments of a run that Zūm Rails has not yet been sent, so they can be paid another way.",
        "description": "Stops the payments of a run that Zūm Rails has not yet been sent, so they can be paid another way. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreparePaymentRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}/register": {
      "get": {
        "operationId": "getChequeRegister",
        "summary": "Returns the cheque register of a payment run.",
        "description": "Returns the cheque register of a payment run. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "runId": {
                      "type": "string"
                    },
                    "entityName": {
                      "type": "string"
                    },
                    "entityTimeZone": {
                      "type": "string"
                    },
                    "account": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "displayName": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "displayName"
                      ],
                      "additionalProperties": false
                    },
                    "registerNumber": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9999
                    },
                    "paymentDate": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "totalMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "releasedBy": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "releasedAt": {
                      "type": "string",
                      "minLength": 20
                    },
                    "cheques": {
                      "maxItems": 500,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "number": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "ISSUED",
                              "VOIDED"
                            ]
                          },
                          "payeeName": {
                            "type": "string"
                          },
                          "mailingAddress": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "amountMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "bills": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "billId": {
                                  "type": "string"
                                },
                                "number": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "amountMinor": {
                                  "type": "string",
                                  "pattern": "^-?\\d+$"
                                }
                              },
                              "required": [
                                "billId",
                                "number",
                                "amountMinor"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "number",
                          "state",
                          "payeeName",
                          "mailingAddress",
                          "amountMinor",
                          "bills"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "runId",
                    "entityName",
                    "entityTimeZone",
                    "account",
                    "registerNumber",
                    "paymentDate",
                    "currency",
                    "totalMinor",
                    "releasedBy",
                    "releasedAt",
                    "cheques"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-runs/{runId}/reverse": {
      "post": {
        "operationId": "reversePaymentRun",
        "summary": "Reverses a released payment run.",
        "description": "Reverses a released payment run. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreparePaymentRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-terms": {
      "get": {
        "operationId": "listPaymentTerms",
        "summary": "Lists the payment terms the ledger offers.",
        "description": "Lists the payment terms the ledger offers. Needs the `ledger:read` permission. Stable: a change that breaks callers needs 365 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "stable",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "side",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "SALES",
                "PURCHASES"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListPaymentTermsResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "createPaymentTerms",
        "summary": "Creates a set of payment terms.",
        "description": "Creates a set of payment terms. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "netDays": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 365
                  },
                  "discountBp": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "discountDays": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 365
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "discountAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "interestMonthlyBp": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "interestAnnualBp": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "appliesTo": {
                    "default": "SALES",
                    "type": "string",
                    "enum": [
                      "SALES",
                      "PURCHASES",
                      "BOTH"
                    ]
                  }
                },
                "required": [
                  "name",
                  "netDays"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPaymentTermsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-terms/draft": {
      "post": {
        "operationId": "draftVendorTerms",
        "summary": "Drafts the payment terms to propose for a vendor.",
        "description": "Drafts the payment terms to propose for a vendor. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-eternify-read": true,
        "x-scope": "ledger:propose",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "words": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "side": {
                    "default": "PURCHASES",
                    "type": "string",
                    "enum": [
                      "SALES",
                      "PURCHASES"
                    ]
                  }
                },
                "required": [
                  "words"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "drafted": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "matchTermsId": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "matchName": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "proposed": {
                              "type": "object",
                              "properties": {
                                "netDays": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 365
                                },
                                "discountBp": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 10000
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "discountDays": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 365
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "interestMonthlyBp": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 10000
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "interestAnnualBp": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 100000
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "netDays",
                                "discountBp",
                                "discountDays",
                                "interestMonthlyBp",
                                "interestAnnualBp"
                              ],
                              "additionalProperties": false
                            },
                            "quote": {
                              "type": "string",
                              "maxLength": 500
                            }
                          },
                          "required": [
                            "matchTermsId",
                            "matchName",
                            "proposed",
                            "quote"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "why": {
                      "type": "string",
                      "enum": [
                        "DISCLOSURE",
                        "BUDGET",
                        "PROVIDER",
                        "UNPARSABLE",
                        "REFUSED",
                        "FIGURE_INVENTED",
                        "STOPPED_AFTER_THREE_REWRITES"
                      ]
                    }
                  },
                  "required": [
                    "drafted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-terms/{termsId}": {
      "patch": {
        "operationId": "updatePaymentTerms",
        "summary": "Changes a set of payment terms.",
        "description": "Changes a set of payment terms. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "termsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "netDays": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 365
                  },
                  "discountBp": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "discountDays": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 365
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "discountAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "interestMonthlyBp": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "interestAnnualBp": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "appliesTo": {
                    "type": "string",
                    "enum": [
                      "SALES",
                      "PURCHASES",
                      "BOTH"
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPaymentTermsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/payment-terms/{termsId}/default": {
      "post": {
        "operationId": "setDefaultPaymentTerms",
        "summary": "Makes one set of payment terms the default.",
        "description": "Makes one set of payment terms the default. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "termsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPaymentTermsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/accounts": {
      "get": {
        "operationId": "reconWorkspace",
        "summary": "Returns the reconciliation workspace for the bank accounts.",
        "description": "Returns the reconciliation workspace for the bank accounts. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "asOf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "financialAccountId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "asOf": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "timeZone": {
                      "type": "string"
                    },
                    "accounts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "displayName": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "BANK",
                              "CARD",
                              "STRIPE"
                            ]
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "entityTimeZone": {
                            "type": "string"
                          },
                          "glAccountId": {
                            "type": "string"
                          },
                          "glAccountCode": {
                            "type": "string"
                          },
                          "glAccountName": {
                            "type": "string"
                          },
                          "aggregator": {
                            "type": "string"
                          },
                          "lastSyncAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "bankBalanceMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "ledgerBalanceMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "unmatchedActivityMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "certifiedDifferenceMinor": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "foreignCurrencyLineCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "foreignCurrencies": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            }
                          },
                          "foreignCurrencyStagedLineCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "foreignStagedCurrencies": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[A-Z]{3}$"
                            }
                          },
                          "unmatchedCount": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "unmatchedOver7Days": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "proposedCount": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "suggestedCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "excludedCount": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "excludedTotalMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "matchedCount": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "unassignedLineCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "heldLineCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "matchesAgainstReversedEntries": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "certifiedThrough": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "certification": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "periodLabel": {
                                    "type": "string"
                                  },
                                  "certifiedBy": {
                                    "type": "string"
                                  },
                                  "certifiedAt": {
                                    "type": "string",
                                    "minLength": 20
                                  }
                                },
                                "required": [
                                  "id",
                                  "periodLabel",
                                  "certifiedBy",
                                  "certifiedAt"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "withdrawnCertification": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "periodLabel": {
                                    "type": "string"
                                  },
                                  "withdrawnBy": {
                                    "type": "string"
                                  },
                                  "withdrawnAt": {
                                    "type": "string",
                                    "minLength": 20
                                  },
                                  "reason": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "periodLabel",
                                  "withdrawnBy",
                                  "withdrawnAt",
                                  "reason"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "certifiedThroughStale": {
                            "type": "boolean"
                          },
                          "certifiablePeriods": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "periodYear": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "periodMonth": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 12
                                },
                                "label": {
                                  "type": "string"
                                },
                                "endsOn": {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "ledgerBalanceMinor": {
                                  "type": "string",
                                  "pattern": "^-?\\d+$"
                                }
                              },
                              "required": [
                                "periodYear",
                                "periodMonth",
                                "label",
                                "endsOn",
                                "ledgerBalanceMinor"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "feedProblem": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "NO_CONNECTION",
                                      "REAUTH_NEEDED",
                                      "DISABLED",
                                      "STALE",
                                      "NEVER_SYNCED"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "remedy": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "message",
                                  "remedy"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lastScanAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lastScanTruncated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "displayName",
                          "kind",
                          "currency",
                          "entityId",
                          "entityName",
                          "entityTimeZone",
                          "glAccountId",
                          "glAccountCode",
                          "glAccountName",
                          "aggregator",
                          "lastSyncAt",
                          "bankBalanceMinor",
                          "ledgerBalanceMinor",
                          "unmatchedActivityMinor",
                          "certifiedDifferenceMinor",
                          "foreignCurrencyLineCount",
                          "foreignCurrencies",
                          "foreignCurrencyStagedLineCount",
                          "foreignStagedCurrencies",
                          "unmatchedCount",
                          "unmatchedOver7Days",
                          "proposedCount",
                          "suggestedCount",
                          "excludedCount",
                          "excludedTotalMinor",
                          "matchedCount",
                          "unassignedLineCount",
                          "heldLineCount",
                          "matchesAgainstReversedEntries",
                          "certifiedThrough",
                          "certification",
                          "withdrawnCertification",
                          "certifiedThroughStale",
                          "certifiablePeriods",
                          "feedProblem",
                          "lastScanAt",
                          "lastScanTruncated"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "accountsTotal": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "accountsTruncated": {
                      "type": "boolean"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "feedProblems": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "unmatchedOver7Days": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "suggestedTotal": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "asOf",
                    "timeZone",
                    "accounts",
                    "accountsTotal",
                    "accountsTruncated",
                    "nextCursor",
                    "feedProblems",
                    "unmatchedOver7Days",
                    "suggestedTotal"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/certifications": {
      "get": {
        "operationId": "listReconCertifications",
        "summary": "Lists the reconciliation certifications.",
        "description": "Lists the reconciliation certifications. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "financialAccountId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "includeWithdrawn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListReconCertificationsResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "certifyReconAccount",
        "summary": "Certifies that a bank account reconciles to a date.",
        "description": "Certifies that a bank account reconciles to a date. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "financialAccountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "periodYear": {
                    "type": "integer",
                    "minimum": 1900,
                    "maximum": 2999
                  },
                  "periodMonth": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 12
                  },
                  "statementBalanceMinor": {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "acceptDifference": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "financialAccountId",
                  "periodYear",
                  "periodMonth",
                  "statementBalanceMinor"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListReconCertificationsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/certifications/{certificationId}/withdraw": {
      "post": {
        "operationId": "withdrawReconCertification",
        "summary": "Withdraws a reconciliation certification.",
        "description": "Withdraws a reconciliation certification. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "certificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListReconCertificationsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/lines": {
      "get": {
        "operationId": "listReconLines",
        "summary": "Lists the bank lines waiting to be reconciled, with the server's total.",
        "description": "Lists the bank lines waiting to be reconciled, with the server's total. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "financialAccountId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "default": "ALL",
              "type": "string",
              "enum": [
                "ALL",
                "PROPOSED",
                "NEEDS_INPUT",
                "MATCHED",
                "EXCLUDED"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "line": {
                            "$ref": "#/components/schemas/Line"
                          },
                          "proposals": {
                            "$ref": "#/components/schemas/Proposals"
                          },
                          "matchedProposalId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "matchedEntryIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "matchId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "matchedShape": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "ONE_TO_ONE",
                                  "ONE_TO_MANY",
                                  "MANY_TO_ONE",
                                  "SPLIT"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "matchedEvidence": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "excludedReason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "matchedInvoices": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "invoiceId": {
                                  "type": "string"
                                },
                                "number": {
                                  "type": "string"
                                },
                                "customerName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "invoiceId",
                                "number",
                                "customerName"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "matchedReceiptId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "line",
                          "proposals",
                          "matchedProposalId",
                          "matchedEntryIds",
                          "matchId",
                          "matchedShape",
                          "matchedEvidence",
                          "excludedReason",
                          "matchedInvoices",
                          "matchedReceiptId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/lines/{sourceTransactionId}/exclude": {
      "post": {
        "operationId": "excludeReconLine",
        "summary": "Excludes a bank line from reconciliation with a reason.",
        "description": "Excludes a bank line from reconciliation with a reason. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "sourceTransactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/matches/{matchId}/unmatch": {
      "post": {
        "operationId": "unmatchReconMatch",
        "summary": "Removes a reconciliation match.",
        "description": "Removes a reconciliation match. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "matchIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "proposalId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "bankLineIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "bankLinesWithDraftedEntry": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "journalLineIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "reason": {
                      "type": "string"
                    },
                    "undoneAt": {
                      "type": "string",
                      "minLength": 20
                    },
                    "undoneBy": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "matchIds",
                    "proposalId",
                    "bankLineIds",
                    "bankLinesWithDraftedEntry",
                    "journalLineIds",
                    "reason",
                    "undoneAt",
                    "undoneBy"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/proposals/{proposalId}/accept": {
      "post": {
        "operationId": "acceptReconMatch",
        "summary": "Accepts a proposed reconciliation match.",
        "description": "Accepts a proposed reconciliation match. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "proposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scoreBp": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  }
                },
                "required": [
                  "scoreBp"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalsItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/proposals/{proposalId}/record-receipt": {
      "post": {
        "operationId": "recordReceiptFromReconProposal",
        "summary": "Records a received payment from a reconciliation proposal.",
        "description": "Records a received payment from a reconciliation proposal. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "proposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "receipt": {
                      "$ref": "#/components/schemas/RecordReceiptResponse"
                    },
                    "matchId": {
                      "type": "string"
                    },
                    "invoices": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "number": {
                            "type": "string"
                          },
                          "appliedMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          }
                        },
                        "required": [
                          "id",
                          "number",
                          "appliedMinor"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "receipt",
                    "matchId",
                    "invoices"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/proposals/{proposalId}/reject": {
      "post": {
        "operationId": "rejectReconMatch",
        "summary": "Rejects a proposed reconciliation match.",
        "description": "Rejects a proposed reconciliation match. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "proposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalsItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/proposals/{proposalId}/settle": {
      "post": {
        "operationId": "settleReconProposal",
        "summary": "Settles a reconciliation proposal, which posts its match.",
        "description": "Settles a reconciliation proposal, which posts its match. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "proposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scoreBp": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "CARD",
                      "PAD",
                      "CHEQUE",
                      "WIRE",
                      "ETRANSFER",
                      "OTHER"
                    ]
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "amountMinor": {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  }
                },
                "required": [
                  "scoreBp",
                  "method",
                  "amountMinor"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "proposal": {
                      "$ref": "#/components/schemas/ProposalsItem"
                    },
                    "settlements": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "billId": {
                            "type": "string"
                          },
                          "settlementId": {
                            "type": "string"
                          },
                          "entryId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "postingMoved": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "billId",
                          "settlementId",
                          "entryId",
                          "postingMoved"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "proposal",
                    "settlements"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/scan": {
      "get": {
        "operationId": "latestReconScan",
        "summary": "Returns the latest reconciliation scan.",
        "description": "Returns the latest reconciliation scan. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "financialAccountId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scan": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/ScanOption1"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "scan"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      },
      "post": {
        "operationId": "scanForMatches",
        "summary": "Scans the bank lines for matches to the ledger.",
        "description": "Scans the bank lines for matches to the ledger. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "financialAccountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "windowDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 400
                  },
                  "amountToleranceMinor": {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  }
                },
                "required": [
                  "financialAccountId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scan": {
                      "$ref": "#/components/schemas/ScanOption1"
                    },
                    "proposals": {
                      "$ref": "#/components/schemas/Proposals"
                    }
                  },
                  "required": [
                    "scan",
                    "proposals"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/split-candidates": {
      "get": {
        "operationId": "listReconSplitCandidates",
        "summary": "Lists the bank lines that may split across several records.",
        "description": "Lists the bank lines that may split across several records. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "financialAccountId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "windowDays",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 400
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "financialAccountId": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "windowFrom": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "windowTo": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "candidates": {
                      "$ref": "#/components/schemas/Candidates"
                    },
                    "truncated": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "financialAccountId",
                    "currency",
                    "windowFrom",
                    "windowTo",
                    "candidates",
                    "truncated"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/recon/splits": {
      "post": {
        "operationId": "proposeReconSplit",
        "summary": "Proposes splitting a bank line across several records.",
        "description": "Proposes splitting a bank line across several records. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "financialAccountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sourceTransactionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "journalLineIds": {
                    "minItems": 1,
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "remainderMinor": {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  "remainderAccountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "remainderMemo": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "financialAccountId",
                  "sourceTransactionId",
                  "journalLineIds",
                  "remainderMinor",
                  "remainderAccountId",
                  "remainderMemo"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "proposal": {
                      "$ref": "#/components/schemas/ProposalsItem"
                    },
                    "remainderEntryId": {
                      "type": "string"
                    },
                    "remainderMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "remainderAccountCode": {
                      "type": "string"
                    },
                    "remainderAccountName": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "proposal",
                    "remainderEntryId",
                    "remainderMinor",
                    "remainderAccountCode",
                    "remainderAccountName"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/remittance-changes": {
      "get": {
        "operationId": "listRemittanceChanges",
        "summary": "Lists the changes to remittance profiles waiting for a decision.",
        "description": "Lists the changes to remittance profiles waiting for a decision. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "BANK_DETAILS",
                "HOW_TO_PAY",
                "PAYMENT_LINK"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "PROPOSED",
                "VERIFIED",
                "REJECTED",
                "WITHDRAWN",
                "EXPIRED"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListRemittanceChangesResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/remittance-changes/{changeId}/reject": {
      "post": {
        "operationId": "rejectRemittanceChange",
        "summary": "Rejects a proposed change to a remittance profile.",
        "description": "Rejects a proposed change to a remittance profile. Needs the `ledger:approve` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:approve",
        "parameters": [
          {
            "name": "changeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListRemittanceChangesResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/remittance-changes/{changeId}/withdraw": {
      "post": {
        "operationId": "withdrawRemittanceChange",
        "summary": "Withdraws a proposed change to a remittance profile.",
        "description": "Withdraws a proposed change to a remittance profile. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "changeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListRemittanceChangesResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/remittance-profiles": {
      "get": {
        "operationId": "listRemittanceProfiles",
        "summary": "Lists the remittance profiles that say where customers pay.",
        "description": "Lists the remittance profiles that say where customers pay. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profiles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                          },
                          "beneficiaryName": {
                            "type": "string"
                          },
                          "beneficiaryAddress": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "institutionName": {
                            "type": "string"
                          },
                          "accountLast4": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4
                          },
                          "swiftBic": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "intermediaryName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "intermediarySwiftBic": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "verifiedBy": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "verifiedAt": {
                            "type": "string",
                            "minLength": 20
                          }
                        },
                        "required": [
                          "id",
                          "entityId",
                          "entityName",
                          "currency",
                          "beneficiaryName",
                          "beneficiaryAddress",
                          "institutionName",
                          "accountLast4",
                          "swiftBic",
                          "intermediaryName",
                          "intermediarySwiftBic",
                          "verifiedBy",
                          "verifiedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "texts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "entityId": {
                            "type": "string"
                          },
                          "howToPay": {
                            "type": "object",
                            "properties": {
                              "en": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "fr": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "en",
                              "fr"
                            ],
                            "additionalProperties": false
                          },
                          "paymentLinkTemplate": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "terms": {
                            "type": "object",
                            "properties": {
                              "en": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "fr": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "en",
                              "fr"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "entityId",
                          "howToPay",
                          "paymentLinkTemplate",
                          "terms"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "profiles",
                    "texts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/run-policies/draft": {
      "post": {
        "operationId": "draftRunPolicy",
        "summary": "Drafts a policy that prepares payment runs on a schedule.",
        "description": "Drafts a policy that prepares payment runs on a schedule. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-eternify-read": true,
        "x-scope": "ledger:admin",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sentence": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 400
                  },
                  "entityId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "sentence",
                  "entityId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "drafted": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "rule": {
                              "type": "object",
                              "properties": {
                                "when": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "$ref": "#/components/schemas/DraftRunPolicyResponsePart1"
                                  }
                                },
                                "then": {
                                  "$ref": "#/components/schemas/ThenOption7"
                                }
                              },
                              "required": [
                                "when",
                                "then"
                              ],
                              "additionalProperties": false
                            },
                            "sentence": {
                              "type": "string"
                            },
                            "expiresOn": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "rule",
                            "sentence",
                            "expiresOn"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "why": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "DISCLOSURE",
                            "BUDGET",
                            "PROVIDER",
                            "MODEL_FAILED",
                            "REFUSED",
                            "UNPARSABLE",
                            "NOT_IN_SENTENCE",
                            "NOT_FROM_LIST"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "PARSER",
                            "MODEL"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "promptVersion": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "drafted",
                    "why",
                    "source",
                    "promptVersion"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/run-policies/firings/{firingId}/lines": {
      "get": {
        "operationId": "listRunPolicyLines",
        "summary": "Lists the lines a payment run policy firing produced.",
        "description": "Lists the lines a payment run policy firing produced. Needs the `audit:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "audit:read",
        "parameters": [
          {
            "name": "firingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "decision",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "TAKEN",
                "SKIPPED"
              ]
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SkipReasonOption1"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LinesItem2"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/run-policies/{ruleId}/declines": {
      "get": {
        "operationId": "listRunPolicyDeclines",
        "summary": "Lists the times a payment run policy declined to run.",
        "description": "Lists the times a payment run policy declined to run. Needs the `audit:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "audit:read",
        "parameters": [
          {
            "name": "ruleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "ruleId": {
                            "type": "string"
                          },
                          "ruleVersion": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "paymentRunId": {
                            "type": "string"
                          },
                          "runLabel": {
                            "type": "string"
                          },
                          "paymentId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "TOO_MUCH",
                              "TOO_EARLY",
                              "WRONG_SUPPLIER",
                              "OTHER"
                            ]
                          },
                          "note": {
                            "type": "string"
                          },
                          "suggestion": {
                            "anyOf": [
                              {
                                "$ref": "#/components/schemas/Suggestion"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "suggestionState": {
                            "type": "string",
                            "enum": [
                              "OPEN",
                              "TAKEN_UP",
                              "SUPERSEDED",
                              "ENDED"
                            ]
                          },
                          "declinedBy": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "declinedAt": {
                            "type": "string",
                            "minLength": 20
                          },
                          "entityTimeZone": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "ruleId",
                          "ruleVersion",
                          "paymentRunId",
                          "runLabel",
                          "paymentId",
                          "kind",
                          "note",
                          "suggestion",
                          "suggestionState",
                          "declinedBy",
                          "declinedAt",
                          "entityTimeZone"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/run-policies/{ruleId}/prepare-now": {
      "post": {
        "operationId": "prepareRunPolicyNow",
        "summary": "Asks the payment policy to prepare a run now; the pass runs a moment later under the policy.",
        "description": "Asks the payment policy to prepare a run now; the pass runs a moment later under the policy. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "ruleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted: the work is done after the answer, or waits for a person's confirmation.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ruleId": {
                      "type": "string"
                    },
                    "ruleVersion": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "weekStart": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "askedAt": {
                      "type": "string",
                      "minLength": 20
                    }
                  },
                  "required": [
                    "ruleId",
                    "ruleVersion",
                    "weekStart",
                    "askedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/settlement-registrations": {
      "get": {
        "operationId": "listSettlementRegistrations",
        "summary": "Lists the accounts that receive settlements, and how each is registered.",
        "description": "Lists the accounts that receive settlements, and how each is registered. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListSettlementRegistrationsResponseItem"
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/settlement-registrations/{financialAccountId}/nominations": {
      "post": {
        "operationId": "nominateSettlementAccounts",
        "summary": "Nominates the accounts a settlement is paid into.",
        "description": "Nominates the accounts a settlement is paid into. Needs the `ledger:admin` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:admin",
        "parameters": [
          {
            "name": "financialAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clearingAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "feeAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "revenueAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "bankAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSettlementRegistrationsResponseItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/settlements": {
      "get": {
        "operationId": "listSettlements",
        "summary": "Lists the settlements from payment processors, with the server's total.",
        "description": "Lists the settlements from payment processors, with the server's total. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "processor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "STRIPE",
                "SHOPIFY",
                "LIGHTSPEED"
              ]
            }
          },
          {
            "name": "clearing",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "zeroed",
                "open"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "processor": {
                            "type": "string",
                            "enum": [
                              "STRIPE",
                              "SHOPIFY",
                              "LIGHTSPEED"
                            ]
                          },
                          "externalId": {
                            "type": "string"
                          },
                          "payoutDate": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                          },
                          "grossMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "feeMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "netMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "entityId": {
                            "type": "string"
                          },
                          "entityName": {
                            "type": "string"
                          },
                          "connectionName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "clearing": {
                            "$ref": "#/components/schemas/Clearing"
                          },
                          "deepLink": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "required": [
                          "id",
                          "processor",
                          "externalId",
                          "payoutDate",
                          "currency",
                          "grossMinor",
                          "feeMinor",
                          "netMinor",
                          "entityId",
                          "entityName",
                          "clearing",
                          "deepLink"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/settlements/assemble": {
      "post": {
        "operationId": "assembleSettlements",
        "summary": "Assembles settlements from the payouts a processor made.",
        "description": "Assembles settlements from the payouts a processor made. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "batchesCreated": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "componentsCreated": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "incompleteGroups": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "remaining": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "stalled": {
                      "type": "boolean"
                    },
                    "failures": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "payoutId": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "SETTLED_BY_STATEMENTS",
                              "COMPONENTS_MISSING",
                              "MIXED_ACCOUNTS",
                              "ACCOUNT_UNKNOWN",
                              "MIXED_CURRENCIES",
                              "BOOKED_AS_BANK_LINES",
                              "STAGED_AFTER_ASSEMBLY",
                              "ASSEMBLED_CONCURRENTLY"
                            ]
                          },
                          "payoutMinor": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "stagedMinor": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "currency": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[A-Z]{3}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "stagedComponentIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "message": {
                            "type": "string"
                          },
                          "remedy": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "payoutId",
                          "reason",
                          "payoutMinor",
                          "stagedMinor",
                          "currency",
                          "stagedComponentIds",
                          "message",
                          "remedy"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "batchesCreated",
                    "componentsCreated",
                    "incompleteGroups",
                    "remaining",
                    "stalled"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/settlements/{settlementId}": {
      "get": {
        "operationId": "getSettlement",
        "summary": "Returns one settlement with the sales and fees it covers.",
        "description": "Returns one settlement with the sales and fees it covers. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "settlementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "processor": {
                      "type": "string",
                      "enum": [
                        "STRIPE",
                        "SHOPIFY",
                        "LIGHTSPEED"
                      ]
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "payoutDate": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "grossMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "feeMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "netMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "entityId": {
                      "type": "string"
                    },
                    "entityName": {
                      "type": "string"
                    },
                    "connectionName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "clearing": {
                      "$ref": "#/components/schemas/Clearing"
                    },
                    "deepLink": {
                      "type": "string",
                      "format": "uri"
                    },
                    "clearingAccount": {
                      "$ref": "#/components/schemas/Account"
                    },
                    "components": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "CHARGE",
                              "REFUND",
                              "FEE",
                              "DISPUTE",
                              "ADJUSTMENT",
                              "PAYOUT"
                            ]
                          },
                          "externalId": {
                            "type": "string"
                          },
                          "occurredAt": {
                            "type": "string",
                            "minLength": 20
                          },
                          "amountMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "feeMinor": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "currency": {
                            "type": "string",
                            "pattern": "^[A-Z]{3}$"
                          },
                          "feeTax": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "EXEMPT_PROCESSING",
                                  "TAXABLE_SAAS",
                                  "TAX_ON_FEES"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "taxAmountMinor": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^-?\\d+$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "entryId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "entryNumber": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "entryStatus": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "journalLineId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "deepLink": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "externalId",
                          "occurredAt",
                          "amountMinor",
                          "feeMinor",
                          "currency",
                          "feeTax",
                          "taxAmountMinor",
                          "entryId",
                          "entryNumber",
                          "entryStatus",
                          "journalLineId",
                          "deepLink"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "componentsNextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "undraftedAdjustments": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "processor",
                    "externalId",
                    "payoutDate",
                    "currency",
                    "grossMinor",
                    "feeMinor",
                    "netMinor",
                    "entityId",
                    "entityName",
                    "clearing",
                    "deepLink",
                    "clearingAccount",
                    "components",
                    "componentsNextCursor",
                    "undraftedAdjustments"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/settlements/{settlementId}/propose": {
      "post": {
        "operationId": "proposeSettlement",
        "summary": "Proposes how a settlement should be posted, for a person to decide.",
        "description": "Proposes how a settlement should be posted, for a person to decide. Needs the `ledger:propose` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:propose",
        "parameters": [
          {
            "name": "settlementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "holdingAccountId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted: the work is done after the answer, or waits for a person's confirmation.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "Ledger-Position": {
                "$ref": "#/components/headers/LedgerPosition"
              },
              "Location": {
                "$ref": "#/components/headers/Location"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UndoAgentBatchResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Problem400"
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "404": {
            "$ref": "#/components/responses/Problem404"
          },
          "409": {
            "$ref": "#/components/responses/Problem409"
          },
          "412": {
            "$ref": "#/components/responses/Problem412"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    },
    "/v1/source-transactions": {
      "get": {
        "operationId": "listSourceTransactions",
        "summary": "Lists the bank transactions from connected sources, with the server's total.",
        "description": "Lists the bank transactions from connected sources, with the server's total. Needs the `ledger:read` permission. Beta: it can change with 30 days' notice.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "beta",
        "x-scope": "ledger:read",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          {
            "name": "connectionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "syncRunId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "NEW",
                "MATCHED",
                "PROPOSED",
                "IGNORED"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "connectionId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "syncRunId": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "NEW",
                              "MATCHED",
                              "PROPOSED",
                              "IGNORED"
                            ]
                          },
                          "txnDate": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "counterparty": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "amountMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "connectionName": {
                            "type": "string"
                          },
                          "providerExternalId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "notInStatements": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "connectionId",
                          "syncRunId",
                          "kind",
                          "status",
                          "txnDate",
                          "description",
                          "counterparty",
                          "amountMinor",
                          "currency",
                          "connectionName",
                          "providerExternalId",
                          "notInStatements"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor",
                    "total"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Problem401"
          },
          "403": {
            "$ref": "#/components/responses/Problem403"
          },
          "422": {
            "$ref": "#/components/responses/Problem422"
          },
          "429": {
            "$ref": "#/components/responses/Problem429"
          },
          "500": {
            "$ref": "#/components/responses/Problem500"
          }
        }
      }
    }
  },
  "webhooks": {
    "paymentRun.cancelled.v1": {
      "post": {
        "summary": "Payment run event: cancelled.",
        "description": "Delivered to your webhook endpoint when this happens. The body is a pointer: read the record with getPaymentRun (GET /v1/payment-runs/{runId}). Return a 2xx status to acknowledge it; a 410 pauses the endpoint.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "stable",
        "x-subject": "PaymentRun",
        "x-read-operation": "getPaymentRun",
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The delivery's id; the same on every retry.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "Unix seconds when the delivery was signed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "One or more `v1,` signatures over id, timestamp and the raw body (two during a secret rotation).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "starts_with",
                    "pattern": "^evt_.*"
                  },
                  "type": {
                    "type": "string",
                    "const": "paymentRun.cancelled.v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "minLength": 20
                  },
                  "apiVersion": {
                    "type": "string",
                    "const": "v1"
                  },
                  "ledgerId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "position": {
                    "type": "string",
                    "pattern": "^(0|[1-9]\\d{0,18})$"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Data4"
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "apiVersion",
                  "ledgerId",
                  "position",
                  "data"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The receiver is gone. The endpoint is paused."
          },
          "2XX": {
            "description": "The delivery was received."
          }
        }
      }
    },
    "paymentRun.paymentReversed.v1": {
      "post": {
        "summary": "Payment run event: payment reversed.",
        "description": "Delivered to your webhook endpoint when this happens. The body is a pointer: read the record with getPaymentRun (GET /v1/payment-runs/{runId}). Return a 2xx status to acknowledge it; a 410 pauses the endpoint.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "stable",
        "x-subject": "PaymentRun",
        "x-read-operation": "getPaymentRun",
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The delivery's id; the same on every retry.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "Unix seconds when the delivery was signed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "One or more `v1,` signatures over id, timestamp and the raw body (two during a secret rotation).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "starts_with",
                    "pattern": "^evt_.*"
                  },
                  "type": {
                    "type": "string",
                    "const": "paymentRun.paymentReversed.v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "minLength": 20
                  },
                  "apiVersion": {
                    "type": "string",
                    "const": "v1"
                  },
                  "ledgerId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "position": {
                    "type": "string",
                    "pattern": "^(0|[1-9]\\d{0,18})$"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Data4"
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "apiVersion",
                  "ledgerId",
                  "position",
                  "data"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The receiver is gone. The endpoint is paused."
          },
          "2XX": {
            "description": "The delivery was received."
          }
        }
      }
    },
    "paymentRun.prepared.v1": {
      "post": {
        "summary": "Payment run event: prepared.",
        "description": "Delivered to your webhook endpoint when this happens. The body is a pointer: read the record with getPaymentRun (GET /v1/payment-runs/{runId}). Return a 2xx status to acknowledge it; a 410 pauses the endpoint.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "stable",
        "x-subject": "PaymentRun",
        "x-read-operation": "getPaymentRun",
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The delivery's id; the same on every retry.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "Unix seconds when the delivery was signed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "One or more `v1,` signatures over id, timestamp and the raw body (two during a secret rotation).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "starts_with",
                    "pattern": "^evt_.*"
                  },
                  "type": {
                    "type": "string",
                    "const": "paymentRun.prepared.v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "minLength": 20
                  },
                  "apiVersion": {
                    "type": "string",
                    "const": "v1"
                  },
                  "ledgerId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "position": {
                    "type": "string",
                    "pattern": "^(0|[1-9]\\d{0,18})$"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Data4"
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "apiVersion",
                  "ledgerId",
                  "position",
                  "data"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The receiver is gone. The endpoint is paused."
          },
          "2XX": {
            "description": "The delivery was received."
          }
        }
      }
    },
    "paymentRun.released.v1": {
      "post": {
        "summary": "Payment run event: released.",
        "description": "Delivered to your webhook endpoint when this happens. The body is a pointer: read the record with getPaymentRun (GET /v1/payment-runs/{runId}). Return a 2xx status to acknowledge it; a 410 pauses the endpoint.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "stable",
        "x-subject": "PaymentRun",
        "x-read-operation": "getPaymentRun",
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The delivery's id; the same on every retry.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "Unix seconds when the delivery was signed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "One or more `v1,` signatures over id, timestamp and the raw body (two during a secret rotation).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "starts_with",
                    "pattern": "^evt_.*"
                  },
                  "type": {
                    "type": "string",
                    "const": "paymentRun.released.v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "minLength": 20
                  },
                  "apiVersion": {
                    "type": "string",
                    "const": "v1"
                  },
                  "ledgerId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "position": {
                    "type": "string",
                    "pattern": "^(0|[1-9]\\d{0,18})$"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Data4"
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "apiVersion",
                  "ledgerId",
                  "position",
                  "data"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The receiver is gone. The endpoint is paused."
          },
          "2XX": {
            "description": "The delivery was received."
          }
        }
      }
    },
    "paymentRun.reversed.v1": {
      "post": {
        "summary": "Payment run event: reversed.",
        "description": "Delivered to your webhook endpoint when this happens. The body is a pointer: read the record with getPaymentRun (GET /v1/payment-runs/{runId}). Return a 2xx status to acknowledge it; a 410 pauses the endpoint.",
        "tags": [
          "banking-and-payments"
        ],
        "x-stability-level": "stable",
        "x-subject": "PaymentRun",
        "x-read-operation": "getPaymentRun",
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The delivery's id; the same on every retry.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "Unix seconds when the delivery was signed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "One or more `v1,` signatures over id, timestamp and the raw body (two during a secret rotation).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "starts_with",
                    "pattern": "^evt_.*"
                  },
                  "type": {
                    "type": "string",
                    "const": "paymentRun.reversed.v1"
                  },
                  "timestamp": {
                    "type": "string",
                    "minLength": 20
                  },
                  "apiVersion": {
                    "type": "string",
                    "const": "v1"
                  },
                  "ledgerId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "position": {
                    "type": "string",
                    "pattern": "^(0|[1-9]\\d{0,18})$"
                  },
                  "data": {
                    "$ref": "#/components/schemas/Data4"
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "apiVersion",
                  "ledgerId",
                  "position",
                  "data"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The receiver is gone. The endpoint is paused."
          },
          "2XX": {
            "description": "The delivery was received."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "evk_ API key",
        "description": "A key an administrator of the books made in the app. It reads, or reads and drafts, on one ledger."
      },
      "oauth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "An access token for a person who connected an app. Its audience is https://api.eternifylabs.com/v1. The app acts with that person's own role, inside what they allowed."
      }
    },
    "schemas": {
      "Account": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "code",
              "name"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "AccountOption1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          }
        },
        "required": [
          "id",
          "displayName",
          "currency"
        ],
        "additionalProperties": false
      },
      "Act": {
        "type": "string",
        "enum": [
          "bills.submit",
          "bills.approve",
          "bills.hold",
          "bills.releaseHold",
          "bills.addToRun",
          "bills.plan",
          "bills.unplan",
          "vendors.holdPayments",
          "vendors.releasePaymentHolds",
          "paymentRuns.cancelDrafts",
          "purchaseOrders.submit",
          "arrivals.notABill",
          "arrivals.handled"
        ]
      },
      "Address": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "label": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "address",
              "label"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "Advice": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ListVendorNoticesResponseItem"
          },
          {
            "type": "null"
          }
        ]
      },
      "Applications": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "invoiceId": {
              "type": "string"
            },
            "invoiceNumber": {
              "type": "string"
            },
            "amountMinor": {
              "type": "string",
              "pattern": "^-?\\d+$"
            },
            "discountTakenMinor": {
              "type": "string",
              "pattern": "^-?\\d+$"
            }
          },
          "required": [
            "invoiceId",
            "invoiceNumber",
            "amountMinor"
          ],
          "additionalProperties": false
        }
      },
      "BankingSignals": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/StoredOption1"
        }
      },
      "BulkHoldVendorPaymentsRequest": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "PREVIEW",
              "RUN"
            ]
          },
          "selection": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "ids"
                  },
                  "ids": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "kind",
                  "ids"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "filter"
                  },
                  "query": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "expectedTotal": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "kind",
                  "query",
                  "expectedTotal"
                ],
                "additionalProperties": false
              }
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "until": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "on": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "confirmed": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "totals": {
                "$ref": "#/components/schemas/Totals2"
              }
            },
            "required": [
              "count",
              "totals"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "mode",
          "selection"
        ],
        "additionalProperties": false
      },
      "BulkHoldVendorPaymentsResponse": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "const": "PREVIEW"
              },
              "act": {
                "$ref": "#/components/schemas/Act"
              },
              "matching": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "taken": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "eligible": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "entityId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "currency": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "minor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "href": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "entityId",
                    "currency",
                    "minor",
                    "href"
                  ],
                  "additionalProperties": false
                }
              },
              "skipped": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    },
                    "sentence": {
                      "type": "string"
                    },
                    "href": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "code",
                    "sentence",
                    "href"
                  ],
                  "additionalProperties": false
                }
              },
              "figures": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "totals": {
                    "$ref": "#/components/schemas/Totals2"
                  },
                  "basis": {
                    "type": "string",
                    "enum": [
                      "FUNCTIONAL_TOTAL",
                      "DOCUMENT_TOTAL",
                      "STILL_OWED",
                      "NONE"
                    ]
                  }
                },
                "required": [
                  "count",
                  "entries",
                  "totals",
                  "basis"
                ],
                "additionalProperties": false
              },
              "authority": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "authorityId": {
                          "type": "string"
                        },
                        "scopeLabel": {
                          "type": "string"
                        },
                        "entityId": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "capMinor": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^-?\\d+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "usedMinor": {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        "over": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "authorityId",
                        "scopeLabel",
                        "entityId",
                        "currency",
                        "capMinor",
                        "usedMinor",
                        "over"
                      ],
                      "additionalProperties": false
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "blocked": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string"
                      },
                      "sentence": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "sentence"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "confirm": {
                "type": "string"
              },
              "handoff": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "entityId": {
                        "type": "string"
                      },
                      "entityName": {
                        "type": "string"
                      },
                      "ids": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "entityId",
                      "entityName",
                      "ids"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "mode",
              "act",
              "matching",
              "taken",
              "eligible",
              "skipped",
              "figures",
              "authority",
              "blocked",
              "confirm",
              "handoff"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "const": "RUN"
              },
              "act": {
                "$ref": "#/components/schemas/Act"
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "DONE",
                        "REFUSED",
                        "NOT_ATTEMPTED"
                      ]
                    },
                    "code": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sentence": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "href": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "outcome",
                    "code",
                    "sentence",
                    "href"
                  ],
                  "additionalProperties": false
                }
              },
              "done": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "refused": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "notAttempted": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "mode",
              "act",
              "rows",
              "done",
              "refused",
              "notAttempted"
            ],
            "additionalProperties": false
          }
        ]
      },
      "Candidates": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "journalLineId": {
              "type": "string"
            },
            "entryId": {
              "type": "string"
            },
            "entryNumber": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "entryRef": {
              "type": "string"
            },
            "occurredOn": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "amountMinor": {
              "type": "string",
              "pattern": "^-?\\d+$"
            },
            "currency": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            },
            "memo": {
              "type": [
                "string",
                "null"
              ]
            },
            "counterparty": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "journalLineId",
            "entryId",
            "entryNumber",
            "entryRef",
            "occurredOn",
            "amountMinor",
            "currency",
            "memo",
            "counterparty"
          ],
          "additionalProperties": false
        }
      },
      "Clearing": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "NOT_PROPOSED",
              "PARTIALLY_POSTED",
              "UNPROVEN",
              "ZEROED",
              "OUT_OF_BALANCE"
            ]
          },
          "balanceMinor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "accountSource": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "BATCH",
                  "REGISTRATION"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "postedComponents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "proposedComponents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalComponents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "state",
          "balanceMinor",
          "accountSource",
          "postedComponents",
          "proposedComponents",
          "totalComponents"
        ],
        "additionalProperties": false
      },
      "Code": {
        "type": "string",
        "x-extensible-enum": [
          "validation_failed",
          "unauthenticated",
          "permission_denied",
          "not_found",
          "precondition_failed",
          "idempotency_conflict",
          "idempotency_in_flight",
          "conflict",
          "counterparty_link_taken",
          "payload_too_large",
          "write_conflict",
          "audit_chain_order",
          "unsupported_version",
          "service_unavailable",
          "not_implemented",
          "rate_limited",
          "payment_required",
          "bad_gateway",
          "internal_error",
          "account_not_active",
          "approval_required",
          "currency_tuple",
          "dimension_policy",
          "entry_changed",
          "gifi_code",
          "gifi_mismatch",
          "gifi_reserved_total",
          "illegal_transition",
          "invalid_draft",
          "invalid_money",
          "materiality_exceeded",
          "payment_file_invalid",
          "period_locked",
          "separation_of_duties",
          "tax_account_not_recurring",
          "tax_check_finding_not_open",
          "unbalanced_entry",
          "invalid_tax_input",
          "unsupported_tax_rule",
          "ai_budget_exceeded",
          "disclosure_not_accepted",
          "invalid_prompt",
          "model_output_unparsable",
          "model_refused",
          "connector_sync_unavailable",
          "no_model_provider",
          "not_in_review_queue",
          "company_domain_personal",
          "company_domain_missing",
          "company_not_found",
          "company_person_not_listed",
          "provider_key_missing",
          "provider_key_refused",
          "provider_unavailable",
          "provider_credits_exhausted",
          "api_key_label_taken",
          "api_key_cap_reached",
          "api_key_already_revoked",
          "api_key_revoked",
          "api_key_expired",
          "public_api_field_not_allowed",
          "public_api_unknown_field",
          "public_api_unknown_parameter",
          "public_api_body_too_large",
          "api_key_warehouse_needs_admin",
          "connection_schedule_shape",
          "connection_schedule_too_frequent",
          "connection_time_zone_unknown",
          "connection_target_required",
          "connection_target_not_allowed",
          "connection_target_not_on_ledger",
          "connection_unsupported_provider",
          "connection_not_ready",
          "connection_ends_on_passed",
          "connection_schedule_not_set",
          "connection_not_stopped",
          "connection_not_a_bank_feed",
          "connection_suggestion_decided",
          "connection_seat_cannot_administer",
          "connection_company_required",
          "connection_suggestion_required",
          "connection_ledger_not_found",
          "connection_history_seat",
          "connection_history_page_size",
          "connection_history_trigger",
          "connection_history_cursor",
          "places_identity_missing",
          "places_not_permitted",
          "places_unavailable",
          "place_not_found",
          "itc_window_not_gst",
          "itc_window_year_unknown",
          "itc_window_year_future",
          "itc_window_already",
          "return_itc_support_not_gst34",
          "return_itc_support_export_too_many",
          "invoice_selection_stale",
          "invoice_documents_overrun",
          "contract_po_needs_approver",
          "grant_read_only",
          "grant_no_deletes",
          "banking_agent_refused",
          "banking_needs_web_app",
          "proposal_not_pending",
          "proposal_expired",
          "proposal_on_its_desk",
          "proposal_awaits_confirmation",
          "proposal_contract_changed",
          "proposal_declined_recently",
          "proposal_input_invalid",
          "proposal_input_sensitive",
          "operation_not_served_here",
          "undo_group_not_yours",
          "undo_group_closed",
          "test_copy_outbound_off",
          "test_copy_replaced",
          "test_copy_exists",
          "test_copy_of_copy",
          "test_copy_not_found",
          "test_copy_too_large",
          "test_copy_not_switchable",
          "test_copy_busy",
          "test_copy_base_missing",
          "promotion_too_large",
          "promotion_conflicted",
          "promotion_unresolved",
          "outbound_guard_belt",
          "operation_replay_only",
          "invitation_request_reused",
          "undo_group_required",
          "approval_needs_person",
          "operation_audit_facts",
          "model_read_facts_moved",
          "operation_call_timed_out",
          "operation_facts_moved",
          "operation_settling",
          "position_ahead_of_ledger",
          "job_not_started",
          "job_message_unreadable",
          "answer_unreadable",
          "resource_required",
          "consent_request_invalid",
          "two_factor_required",
          "two_factor_not_enrolled",
          "two_factor_code_wrong",
          "two_factor_locked",
          "grant_ledgers_empty",
          "grant_ledger_unavailable",
          "connected_app_not_found",
          "connected_app_already_revoked",
          "connected_apps_off",
          "connected_app_not_verified",
          "consent_incomplete",
          "intercompany_elimination_blocked_future",
          "intercompany_elimination_blocked_not_matched",
          "intercompany_elimination_blocked_currency",
          "intercompany_elimination_blocked_fiscal_year",
          "intercompany_elimination_blocked_not_posted",
          "intercompany_elimination_blocked_not_plain",
          "intercompany_elimination_blocked_open_differs",
          "intercompany_elimination_blocked_nothing_to_eliminate",
          "intercompany_void_needs_reason",
          "slip_copy_document_mismatch",
          "search_source_erased",
          "search_source_not_found",
          "search_source_not_failed",
          "search_query_empty",
          "search_unavailable",
          "redaction_unavailable",
          "parser_unavailable",
          "parser_refused",
          "ocr_unavailable",
          "embedding_unavailable",
          "assistant_rate_limited",
          "assistant_turn_running",
          "assistant_turn_ended",
          "assistant_confirmation_pending",
          "assistant_not_connected",
          "assistant_already_connected",
          "assistant_ticket_invalid",
          "assistant_ticket_expired",
          "assistant_turn_not_found",
          "assistant_model_unavailable",
          "erasure_request",
          "model_named",
          "figure_unread",
          "contact_detail",
          "web_address",
          "citation_unread",
          "ledger_required",
          "grant_ledger_excluded",
          "confirmation_not_yours",
          "program_limit_exceeded",
          "program_halted",
          "request_state_invalid",
          "undo_group_undone",
          "warehouse_not_configured",
          "warehouse_kind_unknown",
          "warehouse_target_invalid",
          "warehouse_destination_cap",
          "warehouse_target_taken",
          "warehouse_not_tested",
          "warehouse_residency_unacknowledged",
          "warehouse_destination_removed",
          "warehouse_wrong_state",
          "warehouse_credential_not_rotatable",
          "warehouse_backfill_running",
          "warehouse_writer_unavailable",
          "warehouse_setup_not_described",
          "job_not_found",
          "job_finished",
          "job_not_resumable",
          "job_already_open",
          "job_cancel_not_allowed",
          "job_cancel_reason_required",
          "job_step_failed",
          "job_stalled",
          "job_seat_revoked",
          "job_grant_revoked",
          "provider_token_refreshing",
          "bulk_operation_class_refused",
          "bulk_operation_not_idempotent",
          "bulk_operation_not_served",
          "bulk_operation_too_large",
          "bulk_operation_item_too_large",
          "bulk_operation_unknown",
          "bulk_operation_not_undoable",
          "job_not_pausable",
          "job_paused",
          "job_not_reinstatable",
          "undo_group_not_undone",
          "undo_outside_batch",
          "restore_only_through_undo",
          "undo_authority_revoked",
          "undo_authority_unknown",
          "record_import_not_found",
          "record_import_not_applying",
          "record_import_seat_narrowed",
          "close_not_ready",
          "chart_import_clash",
          "csv_import_too_many_rows",
          "custom_field_limit_reached",
          "custom_field_index_limit_reached",
          "custom_object_limit_reached",
          "custom_object_archived",
          "custom_key_taken",
          "custom_field_not_indexed",
          "custom_field_index_building",
          "custom_reference_not_found",
          "custom_record_changed",
          "dimension_type_limit_reached",
          "dimension_type_system",
          "validation_rule_limit_reached",
          "validation_rule_invalid",
          "validation_rule_failed",
          "record_labels_too_many",
          "custom_field_type_not_on_lines",
          "custom_field_line_not_indexable",
          "custom_field_print_limit_reached",
          "invalid_custom_field",
          "entry_posted",
          "operation_sunset",
          "idempotency_key_required",
          "api_access_not_enabled",
          "api_access_ledger_closed",
          "api_key_maker_left",
          "workflow_definition_invalid",
          "workflow_action_not_offered",
          "workflow_action_banking",
          "workflow_action_person_only",
          "workflow_proposal_not_last",
          "workflow_limit_reached",
          "workflow_expiry_invalid",
          "workflow_preview_required",
          "workflow_needs_second_admin",
          "workflow_owner_lacks_capability",
          "workflow_version_changed",
          "workflow_activation_needs_person",
          "workflow_not_active",
          "workflow_paused",
          "workflow_expired",
          "workflow_draft_missing",
          "approval_step_same_person",
          "approval_vote_twice",
          "rule_routing_moved",
          "rule_auto_approval_web_only",
          "workflow_run_banking_refused",
          "query_not_a_select",
          "query_multiple_statements",
          "query_syntax",
          "query_view_unknown",
          "query_view_not_permitted",
          "query_function_not_allowed",
          "query_construct_not_allowed",
          "query_duplicate_column",
          "query_too_large",
          "query_too_costly",
          "query_timed_out",
          "query_write_refused",
          "query_busy",
          "query_needs_order_for_paging",
          "query_offset_too_large",
          "query_cursor_mismatch",
          "analysis_scope_tampered",
          "analysis_deparse_mismatch",
          "measure_unknown",
          "dimension_unknown",
          "measure_dimension_unreachable",
          "measure_mixed_currency",
          "measure_point_in_time",
          "saved_query_changed",
          "saved_query_limit_reached",
          "saved_query_archived",
          "dimension_value_merge_type",
          "dimension_value_merge_target_merged",
          "dimension_value_merge_self",
          "dimension_value_has_children",
          "dimension_value_not_merged",
          "dimension_value_already_merged",
          "tenant_moving",
          "tenant_unavailable",
          "inbound_address_taken",
          "inbound_domain_taken",
          "vendor_export_too_many",
          "vendor_name_no_letters",
          "vendor_same_supplier",
          "vendor_default_account_not_on_ledger",
          "terms_not_on_ledger",
          "terms_not_for_purchases",
          "terms_days_no_set",
          "terms_days_ambiguous",
          "vendor_company_not_on_ledger",
          "vendor_owner_not_on_ledger",
          "vendor_counterparty_entity_taken",
          "banking_change_already_open",
          "vendor_second_remittance_contact",
          "vendor_archived_closed",
          "vendor_already_archived",
          "vendor_archive_banking_open",
          "vendor_not_archived",
          "vendor_hold_on_archived",
          "vendor_already_held",
          "vendor_not_held",
          "banking_evidence_not_on_ledger",
          "banking_vendor_archived",
          "banking_account_shared",
          "banking_change_already_decided",
          "banking_change_decided_meanwhile",
          "banking_change_frozen",
          "banking_change_not_in_force",
          "banking_decide_own_proposal",
          "banking_withdraw_not_yours",
          "banking_notice_moved",
          "banking_evidence_too_large",
          "banking_notice_not_owed",
          "banking_notice_already_recorded",
          "vendor_contact_remittance_needs_email",
          "vendor_contact_unreachable",
          "vendor_contact_email_role_taken",
          "vendor_contacts_full",
          "vendor_contact_unchanged",
          "purchases_cursor_unknown",
          "vendor_accept_own",
          "vendor_accept_archived",
          "vendor_already_accepted",
          "vendor_refuse_accepted",
          "vendor_refuse_already_decided",
          "banking_same_hand",
          "purchases_verification_method_not_offered",
          "purchases_payable_account_not_liability",
          "purchases_self_approved_export_too_many",
          "bill_export_too_many",
          "bill_vendor_not_on_ledger",
          "bill_vendor_archived",
          "bill_supplier_unnamed",
          "bill_due_before_bill_date",
          "bill_payable_not_on_chart",
          "bill_payable_not_liability",
          "bill_document_not_on_ledger",
          "bill_document_not_viewable",
          "bill_document_missing",
          "bill_document_stand_in",
          "bill_document_wrong_kind",
          "bill_document_inbox_keeps",
          "bill_lines_no_revisions",
          "bill_revision_unknown",
          "bill_line_price_mismatch",
          "bill_own_work_no_ceiling",
          "bill_own_work_over_ceiling",
          "bill_over_approval_ceiling",
          "bill_submit_blocked",
          "bill_decision_unknown",
          "bill_edit_blocked",
          "bill_import_number_required",
          "bill_import_company_gone",
          "bill_import_finding",
          "bill_import_duplicate",
          "bill_duplicate_stopped",
          "bill_not_found",
          "bill_not_awaiting_decision",
          "bill_decided_from_entry",
          "bill_approval_already_decided",
          "bill_cannot_post",
          "bill_line_uncoded",
          "bill_line_tax_changed",
          "bill_total_changed",
          "bill_draft_save_not_draft",
          "bill_edit_payload_unreadable",
          "bill_edit_not_posted",
          "bill_edit_already_pending",
          "bill_edit_payment_pinned",
          "bill_edit_none_pending",
          "bill_edit_own_proposal",
          "bill_edit_stale",
          "bill_edit_no_entry",
          "bill_legacy_changed",
          "bill_legacy_state",
          "bill_payment_changed",
          "bill_not_payable",
          "bill_changed",
          "bill_submit_not_draft",
          "bill_incomplete",
          "bill_number_used",
          "bill_void_not_posted",
          "bill_already_void",
          "bill_void_payment_blocked",
          "bill_void_edit_pending",
          "bill_void_no_entry",
          "bill_discard_not_draft",
          "payment_account_currency_not_in_file",
          "payment_originator_not_bank",
          "payment_run_export_too_many",
          "payment_date_too_far_ahead",
          "payment_date_too_far_back",
          "payment_run_account_not_company_bank",
          "payment_run_account_no_originator",
          "payment_run_bills_refused",
          "payment_run_bill_taken",
          "payment_run_allocation_moved",
          "payment_run_moved_meanwhile",
          "payment_run_payment_moved",
          "payment_run_release_own",
          "payment_run_not_draft",
          "payment_run_callback_unconfirmed",
          "payment_run_callback_unknown",
          "payment_run_no_rate",
          "payment_run_vendors_not_accepted",
          "payment_run_vendors_held",
          "payment_run_banking_moved",
          "payment_allocation_no_bill",
          "payment_bill_no_longer_owed",
          "payment_bill_entry_moved",
          "payment_bill_payable_lines",
          "payment_bill_payable_differs",
          "payment_run_cannot_cancel",
          "payment_run_cannot_reverse",
          "payment_run_no_entries",
          "payment_run_already_reversed",
          "payment_run_no_file",
          "payment_run_over_ceiling",
          "inbox_read_flag_not_open",
          "inbox_read_not_this_document",
          "inbox_read_already_read",
          "inbox_read_would_not_change",
          "inbox_read_attempts_used",
          "inbox_arrival_invoices_not_ours",
          "inbox_arrival_owned_by_bill",
          "inbox_arrival_at_the_desk",
          "inbox_arrival_already_decided",
          "inbox_arrival_sent_to_reader",
          "inbox_arrival_nothing_to_read",
          "inbox_arrival_type_not_readable",
          "inbox_arrival_already_read",
          "inbox_arrival_still_being_read",
          "inbox_arrivals_export_too_many",
          "inbox_refusals_export_too_many",
          "inbox_documents_export_too_many",
          "inbox_reply_stop_exists",
          "inbox_reply_stop_already_lifted",
          "inbox_replies_address_revoked",
          "inbox_replies_invoices_address",
          "inbox_replies_no_contact",
          "inbox_replies_until_out_of_range",
          "inbox_replies_already_off",
          "inbox_address_export_too_many",
          "inbox_address_mint_collided",
          "inbox_address_already_revoked",
          "inbox_address_vendor_archived",
          "inbox_address_watcher_no_seat",
          "inbox_address_telephone_required",
          "inbox_address_watcher_moved",
          "inbox_address_watcher_unchanged",
          "inbox_address_revoked_final",
          "inbox_address_binding_fixed",
          "inbox_address_invoices_not_bound",
          "inbox_address_suggestion_changed",
          "inbox_address_not_waiting",
          "inbox_address_no_suggestion",
          "vendor_notice_export_too_many",
          "vendor_notice_already_sent",
          "vendor_notice_withheld",
          "vendor_notice_draft_names_nobody",
          "vendor_notice_outbound_not_approved",
          "vendor_notice_recipient_stopped",
          "vendor_notice_recipient_bounced",
          "vendor_notice_relay_refused",
          "vendor_notice_vendor_archived",
          "vendor_notice_vendor_refused",
          "vendor_notice_address_unusable",
          "vendor_notice_recipient_not_on_record",
          "vendor_notice_no_email",
          "vendor_notice_no_contact",
          "vendor_notice_draft_open",
          "vendor_notice_not_drafted",
          "vendor_notice_paragraph_contact_detail",
          "vendor_notice_paragraph_banking",
          "bill_no_authority",
          "bill_outside_authority",
          "bill_authority_expired",
          "payment_run_no_authority",
          "payment_run_outside_authority",
          "payment_run_authority_expired",
          "authority_self_set",
          "authority_not_approver",
          "authority_scope_not_on_ledger",
          "authority_currency_not_company",
          "authority_own_work_above_cap",
          "authority_run_scope",
          "authority_expiry_out_of_range",
          "authority_already_open",
          "authority_closed",
          "authority_nothing_changed",
          "authority_carried_over_none",
          "authority_as_at_future",
          "authority_export_too_many",
          "bill_not_on_your_desk",
          "bill_stage_same_person",
          "bill_desk_not_waiting",
          "bill_desk_reassign_not_yours",
          "bill_desk_reassign_no_seat",
          "bill_desk_reassign_preparer",
          "bill_desk_reassign_no_authority",
          "bill_desk_reassign_same",
          "bill_desk_reassign_reviewer",
          "bill_awaiting_with_view",
          "bill_awaiting_too_many",
          "bill_approval_stage_export_too_many",
          "purchases_substitute_not_yours",
          "purchases_substitute_self",
          "purchases_substitute_no_seat",
          "purchases_substitute_too_long",
          "purchases_substitute_in_past",
          "purchases_substitute_overlap",
          "purchases_substitute_ended",
          "purchases_routing_desk_not_for_entries",
          "purchases_routing_author_no_authority",
          "purchases_policy_preview_needed",
          "purchases_policy_confirm_not_author",
          "purchases_policy_expiry_too_far",
          "purchases_policy_expiry_past",
          "purchases_policy_turn_on_by_confirm",
          "payment_originator_change_open",
          "payment_originator_same_as_in_force",
          "payment_originator_evidence_not_on_ledger",
          "payment_originator_decide_own_proposal",
          "payment_originator_change_already_decided",
          "payment_originator_change_decided_meanwhile",
          "payment_originator_withdraw_not_yours",
          "payment_run_originator_unverified",
          "payment_run_release_not_recorded",
          "bill_own_work_not_recorded",
          "payment_run_file_store_unavailable",
          "payment_run_file_missing",
          "payment_run_file_changed",
          "payment_run_file_stand_in",
          "full_export_own_request",
          "full_export_sole_admin",
          "full_export_override_not_sole",
          "full_export_override_not_owner",
          "full_export_already_decided",
          "full_export_decision_window_passed",
          "full_export_bank_files_not_confirmed",
          "full_export_bank_files_web_only",
          "full_export_not_approved",
          "full_export_not_yours",
          "full_export_already_downloaded",
          "full_export_download_window_passed",
          "full_export_not_requester",
          "full_export_list_too_many",
          "full_export_not_ready",
          "full_export_build_failed",
          "full_export_build_cancelled",
          "signal_already_decided",
          "signal_dismiss_own_work",
          "signal_export_too_many",
          "signal_decided_by_banking_change",
          "banking_signals_changed",
          "banking_reject_signal_not_fired",
          "vendor_sender_domain_already_retired",
          "vendor_sender_domain_not_retired",
          "bill_hold_not_payable",
          "bill_already_held",
          "bill_not_held",
          "bill_hold_until_past",
          "bill_hold_until_too_far",
          "payment_run_bills_held",
          "payment_run_bill_held_meanwhile",
          "bill_settlement_not_owed",
          "bill_settlement_in_draft_run",
          "bill_settlement_amount_moved",
          "bill_settlement_future_date",
          "bill_settlement_account_not_company",
          "bill_settlement_currency",
          "bill_settlement_paid_amount_required",
          "bill_settlement_method_not_recordable",
          "bill_settlement_no_open_period",
          "bill_settlement_payable_lines",
          "bill_settlement_payable_differs",
          "bill_settlement_same_person",
          "bill_settlement_over_ceiling",
          "bill_settlement_held",
          "bill_settlement_not_awaiting",
          "bill_settlement_run_owned",
          "bill_settlement_void_period_closed",
          "bill_paid_by_in_draft",
          "bill_paid_by_closed",
          "bill_paid_by_in_run",
          "bill_paid_by_recorded",
          "bill_still_owed_not_listed",
          "bill_paid_by_at_review",
          "bill_edit_paid_by",
          "purchases_as_of_future",
          "purchases_ageing_too_many_bills",
          "purchases_ageing_export_too_many",
          "purchases_report_unknown",
          "purchases_report_filter_not_taken",
          "purchases_report_status_unknown",
          "purchases_report_needs_company",
          "purchases_report_needs_dimension",
          "purchases_report_needs_slip_kind",
          "purchases_report_no_registration",
          "purchases_report_range_too_long",
          "purchases_report_controls_seat",
          "purchases_report_export_too_many",
          "purchases_report_working_set",
          "purchases_report_view_limit",
          "purchases_report_view_name_taken",
          "payment_run_reversal_not_recorded",
          "purchases_fx_method_recent",
          "bill_fx_not_foreign",
          "bill_fx_not_posted",
          "bill_fx_already_stated",
          "bill_fx_rate_date_future",
          "bill_itc_statement_void",
          "bill_itc_statement_not_claimed",
          "bill_itc_statement_stale",
          "vendor_registration_no_number",
          "vendor_registration_number_changed",
          "vendor_registration_date_future",
          "vendor_registration_evidence_not_found",
          "vendor_registration_evidence_too_large",
          "vendor_registration_evidence_missing",
          "vendor_registration_evidence_stand_in",
          "vendor_registration_state_checked",
          "bill_posting_date_required",
          "bill_posting_date_outside",
          "bill_posting_date_not_moved",
          "bill_posting_no_open_period",
          "bill_posting_date_not_recorded",
          "bill_posting_date_at_review",
          "payment_run_bill_owed_moved",
          "payment_bill_owed_moved",
          "bill_settlement_more_than_owed",
          "bill_settlement_short_without_reason",
          "vendor_credit_not_draft",
          "vendor_credit_no_vendor",
          "vendor_credit_incomplete",
          "vendor_credit_nothing_credited",
          "vendor_credit_number_used",
          "vendor_credit_date_future",
          "vendor_credit_vendor_archived",
          "vendor_credit_not_in_review",
          "vendor_credit_same_person",
          "vendor_credit_pricing_moved",
          "vendor_credit_posting_date_required",
          "vendor_credit_posting_date_outside",
          "vendor_credit_posting_date_not_moved",
          "vendor_credit_no_open_period",
          "vendor_credit_not_open",
          "vendor_credit_bill_other_vendor",
          "vendor_credit_bill_other_company",
          "vendor_credit_bill_currency",
          "vendor_credit_bill_not_owing",
          "vendor_credit_bill_in_draft_run",
          "vendor_credit_payable_differs",
          "vendor_credit_bill_over_open",
          "vendor_credit_over_remaining",
          "vendor_credit_already_applied",
          "vendor_credit_exchange_account_missing",
          "vendor_credit_application_in_run",
          "vendor_credit_application_not_live",
          "vendor_credit_not_approved",
          "vendor_credit_has_applications",
          "vendor_credit_has_refunds",
          "vendor_credit_refund_future_date",
          "vendor_credit_refund_account_not_company",
          "vendor_credit_refund_amount_required",
          "vendor_credit_refund_over_remaining",
          "vendor_credit_refund_not_awaiting",
          "vendor_credit_refund_not_standing",
          "vendor_credit_refund_same_person",
          "vendor_credit_export_too_many",
          "payment_run_credit_not_open",
          "payment_run_credit_other_vendor",
          "payment_run_credit_over_open",
          "payment_run_credit_covers_bill",
          "bill_supersede_not_draft",
          "bill_supersede_self",
          "bill_supersede_target_unknown",
          "bill_supersede_target_draft",
          "bill_supersede_other_company",
          "bill_supersede_no_vendor",
          "bill_supersede_other_vendor",
          "bill_supersede_taken",
          "bill_supersede_already_linked",
          "bill_supersede_not_linked",
          "bill_supersede_first_stands",
          "bill_supersede_flag_settled",
          "bill_supersede_flag_not_this",
          "payment_run_cheque_number_required",
          "payment_run_cheque_number_not_asked",
          "payment_run_cheque_number_range",
          "payment_run_cheque_number_taken",
          "payment_run_register_not_cheque",
          "payment_run_register_not_released",
          "bill_settlement_line_not_a_candidate",
          "bill_settlement_line_declined",
          "bill_settlement_feed_score_moved",
          "bill_settlement_line_taken",
          "bill_settlement_line_certified",
          "bill_feed_line_not_a_candidate",
          "payment_discount_changed",
          "payment_discount_window_closed",
          "payment_discount_account_type",
          "payment_run_remove_not_draft",
          "payment_run_remove_last",
          "payment_run_payment_already_removed",
          "payment_reverse_not_released",
          "payment_removed_never_posted",
          "payment_already_reversed",
          "payment_reverse_file_rejected",
          "payment_return_date_invalid",
          "payment_run_notice_document_invalid",
          "payment_run_lodgement_not_released",
          "payment_run_lodgement_recorded",
          "payment_run_lodgement_reversed",
          "payment_run_lodgement_date_invalid",
          "payment_run_outcome_not_lodged",
          "payment_run_outcome_recorded",
          "payment_run_outcome_accepted_reversed",
          "payment_run_outcome_after_return",
          "payment_run_outcome_date_invalid",
          "payment_run_banking_returned",
          "payment_run_banking_returned_meanwhile",
          "payment_run_totals_not_recorded",
          "payment_run_lodgement_cheque",
          "payment_run_bills_twin_paid",
          "bill_settlement_line_not_a_bill",
          "bill_settlement_line_amount_differs",
          "payment_run_clearing_disagrees",
          "payment_bank_profile_no_originator",
          "payment_bank_profile_exists",
          "payment_bank_profile_uncited",
          "payment_bank_profile_changed",
          "payment_run_test_not_draft",
          "payment_run_test_no_profile",
          "payment_run_test_check_failed",
          "payment_bank_file_verdict_recorded",
          "payment_bank_file_verdict_no_evidence",
          "payment_bank_file_evidence_not_on_ledger",
          "payment_bank_file_tests_export_too_many",
          "payment_run_bank_file_unproved",
          "payment_run_bank_date_window",
          "payment_run_bank_currency_refused",
          "payment_run_test_not_eft",
          "vendor_notice_remittance_run_not_released",
          "vendor_notice_remittance_not_sender",
          "vendor_notice_remittance_needs_second_person",
          "vendor_notice_remittance_new_address_needs_person",
          "vendor_notice_remittance_confirm_not_new",
          "vendor_notice_remittance_exists",
          "vendor_notice_remittance_payment_reversed",
          "vendor_notice_remittance_from_run",
          "vendor_notice_remittance_paragraph_contact_detail",
          "vendor_notice_remittance_paragraph_banking",
          "vendor_notice_remittance_paragraph_promise",
          "vendor_notice_bill_no_supplier",
          "vendor_notice_decision_not_made",
          "vendor_notice_no_supplier_contact",
          "vendor_notice_supplier_contact_no_seat",
          "vendor_notice_decision_draft_open",
          "vendor_notice_already_told",
          "vendor_notice_nothing_to_ask",
          "vendor_notice_words_decision",
          "vendor_notice_words_contact_detail",
          "vendor_notice_words_banking",
          "vendor_notice_banking_no_earlier_contact",
          "vendor_notice_recipient_after_change",
          "vendor_notice_not_person_drafted",
          "inbox_address_closing_out_of_range",
          "inbox_address_closing_scheduled",
          "inbox_address_closing_not_scheduled",
          "inbox_address_successor_unusable",
          "purchases_supplier_contact_no_seat",
          "inbox_address_closing_not_announced",
          "vendor_notice_supplier_contact_bills_address",
          "inbox_arrival_owned_by_credit",
          "vendor_credit_refund_currency",
          "vendor_credit_line_other_bill",
          "bill_settlement_evidence_unreadable",
          "bill_feed_line_no_supplier",
          "payment_run_bank_notice_too_large",
          "payment_run_wire_abroad_unreadable",
          "bill_supersede_prefill_too_many_lines",
          "bill_supersede_prefill_no_lines",
          "vendor_document_not_paper",
          "vendor_document_already_filed",
          "vendor_document_title",
          "vendor_document_dates",
          "vendor_document_expiry_too_far",
          "vendor_document_replaces_other_kind",
          "vendor_document_already_replaced",
          "vendor_document_already_withdrawn",
          "vendor_document_waiver_in_force",
          "vendor_document_without_terms_kind",
          "vendor_paper_cap",
          "vendor_paper_file_missing",
          "vendor_paper_file_stand_in",
          "vendor_agreement_term",
          "vendor_agreement_dates",
          "vendor_agreement_notice",
          "vendor_agreement_committed",
          "vendor_agreement_copy_not_theirs",
          "vendor_agreement_already_renewed",
          "vendor_agreement_not_your_decision",
          "vendor_agreement_closed",
          "vendor_paper_notice_no_recipient",
          "vendor_paper_notice_nothing_to_ask",
          "vendor_paper_notice_open_draft",
          "vendor_paper_notice_not_deciding_to_end",
          "vendor_paper_notice_needs_agreement",
          "vendor_paper_notice_names_no_agreement",
          "paper_requirements_count_moved",
          "paper_requirements_too_many",
          "paper_requirements_no_kind",
          "vendor_alias_key_taken",
          "vendor_alias_is_own_name",
          "vendor_alias_limit",
          "vendor_merged_not_restorable",
          "vendor_link_changed",
          "vendor_link_posted_needs_approver",
          "vendor_link_nothing",
          "vendor_merge_same_record",
          "vendor_merge_absorbed_archived",
          "vendor_merge_survivor_archived",
          "vendor_merge_absorbed_refused",
          "vendor_merge_survivor_refused",
          "vendor_merge_banking_open",
          "vendor_merge_banking_differs",
          "vendor_merge_hold_would_lift",
          "vendor_merge_in_draft_run",
          "vendor_merge_bills_in_review",
          "vendor_merge_open_credit",
          "vendor_merge_authority_scope",
          "vendor_merge_counterparty",
          "vendor_merge_slip_kind_differs",
          "vendor_merge_residency_differs",
          "vendor_merge_slip_consent_both_live",
          "vendor_merge_paper_over_cap",
          "vendor_merge_already_open",
          "vendor_merge_survivor_is_absorbed",
          "vendor_merge_same_hand",
          "vendor_merge_expired",
          "vendor_merge_decided",
          "vendor_merge_changed",
          "vendor_merge_withdraw_not_proposer",
          "vendor_merge_export_too_many",
          "vendor_merge_suggestion_dismissed",
          "vendor_merge_suggestion_reinstated",
          "bill_vendor_merged",
          "bill_link_vendor_in_review",
          "bill_link_vendor_void",
          "bill_link_vendor_posted_has_vendor",
          "supplier_match_decided",
          "bill_supplier_match_other_supplier",
          "slip_copies_file_not_kept",
          "slip_copies_print_too_many",
          "slip_copies_print_none",
          "slip_copy_document_not_stored",
          "slip_copy_export_too_many",
          "slip_copies_mailed_set_changed",
          "slip_copies_mailed_not_waiting",
          "slip_copies_mailed_future",
          "slip_consent_no_email",
          "slip_consent_already_live",
          "slip_consent_future",
          "slip_consent_not_given",
          "slip_copy_email_no_consent",
          "slip_copy_from_copies",
          "slip_copy_notice_by_hand",
          "slip_identity_ask_nothing_missing",
          "slip_identity_ask_recent",
          "bill_withholding_status",
          "bill_withholding_vendor_residency",
          "bill_withholding_withheld_on",
          "bill_withholding_changed",
          "bill_withholding_line_not_current",
          "bill_withholding_line_not_service",
          "bill_withholding_whole_bill_has_lines",
          "withholding_waiver_vendor",
          "withholding_waiver_document",
          "withholding_waiver_company",
          "withholding_waiver_already_recorded",
          "withholding_waiver_already_ended",
          "withholding_waiver_end_date",
          "purchases_withholding_account_not_liability",
          "vendor_slip_non_resident",
          "vendor_residency_has_nr_slip",
          "payment_withholding_moved",
          "payment_withholding_account_moved",
          "inbox_controls_sender_above_address",
          "inbox_arrival_held",
          "inbox_hold_not_held",
          "inbox_controls_export_too_many",
          "inbox_controls_firings_filters",
          "payment_run_marks_unconfirmed",
          "payment_run_marks_unknown",
          "payment_run_marks_not_recorded",
          "payment_run_brief_not_draft",
          "bill_dimension_value_unknown",
          "bill_proposed_tag_not_on_line",
          "bill_dimension_not_recorded",
          "bill_budget_changed",
          "bill_budget_not_open",
          "seat_company_outside",
          "seat_company_all_needed",
          "seat_company_person_not_covering",
          "seat_company_policy_wide",
          "seat_company_unclassified",
          "seat_company_report_needs_one",
          "seat_company_not_on_ledger",
          "seat_company_ledger_mismatch",
          "purchase_order_not_found",
          "purchase_order_not_draft",
          "purchase_order_empty_patch",
          "purchase_order_incomplete",
          "purchase_order_vendor_unusable",
          "purchase_order_asked_not_covered",
          "purchase_order_fx_no_rate",
          "purchase_order_fx_not_foreign",
          "purchase_order_dimension_misfiled",
          "purchase_order_awaiting_with_status",
          "purchase_order_changed",
          "purchase_order_not_in_approval",
          "purchase_order_no_authority",
          "purchase_order_outside_authority",
          "purchase_order_authority_expired",
          "purchase_order_over_approval_ceiling",
          "purchase_order_own_work_no_ceiling",
          "purchase_order_cannot_take_back",
          "purchase_order_take_back_seat",
          "purchase_order_notice_open",
          "purchase_order_not_sent",
          "purchase_order_cancel_seat",
          "purchase_order_cancelled",
          "purchase_order_not_approved_to_send",
          "purchase_order_already_sent",
          "purchase_order_no_recipient",
          "purchase_order_recipient_unknown",
          "purchase_order_not_cancelled",
          "purchase_order_series_next_lower",
          "purchase_order_export_too_many",
          "purchase_order_quote_document_not_quote",
          "purchase_order_suggestion_gone",
          "goods_receipt_not_found",
          "purchase_order_not_receivable",
          "goods_receipt_incomplete",
          "goods_receipt_over_receipt",
          "goods_receipt_future_date",
          "goods_receipt_before_order",
          "goods_receipt_receiver_is_approver",
          "goods_receipt_service_requester_only",
          "goods_receipt_on_behalf_seat",
          "goods_receipt_on_behalf_note",
          "goods_receipt_order_changed",
          "goods_receipt_not_proposed",
          "goods_receipt_not_confirmed",
          "goods_receipt_void_seat",
          "goods_receipt_billed",
          "goods_receipt_evidence_limit",
          "goods_receipt_evidence_kind",
          "goods_receipt_evidence_not_attached",
          "goods_receipt_attach_not_live",
          "goods_receipt_withdraw_seat",
          "purchase_order_cancel_after_receipt",
          "purchase_order_amend_after_receipt",
          "purchase_order_cannot_close",
          "purchase_order_close_seat",
          "purchase_order_not_closed",
          "bill_order_link_not_open",
          "bill_order_line_wrong_company",
          "bill_order_line_wrong_supplier",
          "bill_order_line_not_open",
          "bill_order_link_not_recorded",
          "bill_order_link_no_line",
          "bill_order_link_duplicate_line",
          "bill_order_proposal_cleared_line",
          "bill_order_proposal_no_supplier",
          "bill_match_changed",
          "purchases_policy_tolerance_over_authority",
          "vendor_order_exemption_reason_required",
          "accrual_account_missing",
          "accrual_account_not_liability",
          "accrual_account_is_payable",
          "accrual_period_locked",
          "accrual_earlier_standing",
          "accrual_nothing_to_accrue",
          "accrual_standing_differs",
          "accrual_rate_missing",
          "accrual_too_many_lines",
          "expected_bills_month_in_future",
          "expected_bills_export_too_many",
          "accrual_no_signals",
          "accrual_bill_arrived",
          "accrual_already_drafted",
          "accrual_not_predicted",
          "schedule_follow_not_posted",
          "schedule_follow_other_schedule",
          "schedule_follow_inactive",
          "signal_scope_not_offered",
          "bill_prepaid_changed",
          "bill_prepaid_choice_missing",
          "bill_prepaid_not_open",
          "bill_prepaid_released",
          "bill_prepaid_line_locked",
          "prepaid_release_waiting",
          "prepaid_nothing_to_end",
          "prepaid_period_closed",
          "prepaid_not_active",
          "prepaid_destination_refused",
          "prepaid_account_type",
          "bill_holdback_too_large",
          "bill_holdback_amount_invalid",
          "bill_holdback_foreign_currency",
          "bill_holdback_account_missing",
          "bill_holdback_account_not_liability",
          "bill_holdback_account_is_payable",
          "bill_holdback_release_not_posted",
          "bill_holdback_release_exceeds",
          "bill_holdback_release_none_left",
          "bill_holdback_release_before_bill",
          "bill_holdback_release_future",
          "bill_holdback_edit_released",
          "bill_holdback_void_released",
          "bill_holdback_none_note_short",
          "purchases_settings_account_shared",
          "cutover_exists",
          "cutover_date_future",
          "cutover_date_before_incorporation",
          "cutover_suspense_type",
          "cutover_suspense_inactive",
          "cutover_suspense_is_payable",
          "cutover_go_live_documents",
          "cutover_go_live_owned",
          "cutover_settled_frozen",
          "cutover_already_settled",
          "cutover_withdrawn",
          "cutover_withdraw_date_moved",
          "cutover_withdraw_opening_entry",
          "cutover_opening_entry_company",
          "cutover_opening_entry_date",
          "cutover_opening_entry_status",
          "cutover_checks_failing",
          "cutover_checks_changed",
          "cutover_acknowledgement_unknown",
          "cutover_export_too_many",
          "open_payables_cutover_closed",
          "open_payables_wrong_company",
          "open_payables_uploader_posts",
          "open_payables_attestation_missing",
          "open_payables_rows_not_ready",
          "open_payables_count_changed",
          "open_payables_difference_unexplained",
          "open_payables_authority",
          "open_payables_period_locked",
          "open_payables_reverse_closed",
          "open_payables_already_reversed",
          "open_payables_reverse_blocked",
          "open_payables_bill_not_editable",
          "open_payables_bill_void_closed",
          "open_payables_cutover_has_postings",
          "parallel_run_payables_month_not_ended",
          "parallel_run_payables_not_addable",
          "parallel_run_payables_not_compared",
          "parallel_run_proposal_decided",
          "parallel_run_proposal_stale",
          "parallel_run_total_not_classified",
          "parallel_run_proposal_not_found",
          "parallel_run_month_past_line_ceiling",
          "banking_batch_not_yours",
          "banking_batch_file_format",
          "banking_batch_too_many",
          "banking_batch_secret_fill",
          "banking_batch_paper_limit",
          "banking_batch_paper_duplicate",
          "banking_batch_paper_closed",
          "banking_batch_check_nothing",
          "banking_batch_check_running",
          "banking_batch_filter_kind",
          "banking_batch_expired",
          "banking_batch_still_reading",
          "banking_paper_name_empty",
          "banking_paper_taken_off",
          "bill_payable_account_not_recorded",
          "payment_run_release_totals_not_recorded",
          "record_import_apply_running",
          "record_import_too_many_to_approve",
          "record_import_revert_refused",
          "record_import_revert_asset_standing",
          "record_import_revert_customer_waiting",
          "record_import_kind_web_only",
          "payment_run_release_timed_out",
          "list_sort_unknown",
          "list_sort_needs_company",
          "list_sort_unavailable",
          "bill_amount_needs_company",
          "purchases_cursor_other_order",
          "list_view_limit",
          "list_view_shared_limit",
          "list_view_name_taken",
          "list_view_params_not_taken",
          "list_view_share_needs_seat",
          "bulk_act_empty",
          "bulk_act_too_many",
          "bulk_act_reason_needed",
          "bulk_act_filter_not_taken",
          "bulk_act_filter_changed",
          "bulk_act_changed",
          "bulk_act_over_cap",
          "bulk_act_nothing_eligible",
          "bulk_act_wrong_mode",
          "bulk_item_not_found",
          "bulk_item_status",
          "bill_bulk_stage_is_review",
          "bill_bulk_no_rate",
          "bill_bulk_month_closed",
          "bill_bulk_over_budget",
          "bill_bulk_match_exception",
          "bill_bulk_prepaid_offered",
          "bill_bulk_findings",
          "bill_bulk_signal_open",
          "bill_bulk_not_draft",
          "bill_bulk_not_held",
          "vendor_bulk_already_held",
          "vendor_bulk_not_held",
          "payment_run_bulk_not_draft",
          "purchase_order_bulk_not_draft",
          "inbox_bulk_already_decided",
          "purchases_export_kind_unknown",
          "purchases_export_query_invalid",
          "purchases_export_open_limit",
          "purchases_export_all_needs_audit",
          "purchases_export_not_ready",
          "purchases_export_failed",
          "purchases_export_expired",
          "purchases_export_not_yours",
          "purchases_export_seat_changed",
          "purchases_export_object_missing",
          "privacy_received_out_of_range",
          "privacy_identity_note_needed",
          "privacy_not_an_individual",
          "privacy_duplicate_open",
          "privacy_change_in_force",
          "privacy_change_in_draft_run",
          "privacy_change_not_paid",
          "privacy_digits_already_destroyed",
          "privacy_permission_needed",
          "privacy_permission_voided",
          "privacy_permission_other_supplier",
          "privacy_permission_duplicate",
          "privacy_permission_used",
          "privacy_own_request",
          "privacy_not_waiting",
          "privacy_not_open",
          "privacy_plan_moved",
          "privacy_not_yours",
          "privacy_answer_before_decision",
          "privacy_already_answered",
          "privacy_pack_not_for_this_kind",
          "privacy_pack_not_asked",
          "privacy_pack_not_ready",
          "privacy_pack_build_failed",
          "privacy_pack_build_cancelled",
          "privacy_pack_gone",
          "privacy_admin_only",
          "privacy_message_too_long",
          "privacy_no_decision_for_copy",
          "privacy_export_too_many",
          "privacy_permission_letter_wrong_kind",
          "vendor_merge_privacy_request_open",
          "vendor_merge_portal_submission_waiting",
          "vendor_merge_vendor_query_open",
          "vendor_merge_vendor_statement_open",
          "year_end_file_year_end_invalid",
          "year_end_file_building",
          "year_end_file_not_building",
          "year_end_file_not_ready",
          "year_end_file_already_signed",
          "year_end_file_store_unavailable",
          "year_end_file_audit_seat",
          "year_end_file_commentary_figure",
          "year_end_file_decisions_incomplete",
          "year_end_commentary_attempts",
          "year_end_file_export_too_many",
          "vendor_portal_off",
          "vendor_portal_link_revoked",
          "vendor_portal_no_live_link",
          "vendor_portal_issuer_deciding",
          "vendor_portal_already_decided",
          "vendor_portal_record_moved",
          "vendor_portal_submission_kind",
          "vendor_portal_evidence_mismatch",
          "vendor_portal_closed",
          "vendor_portal_facts_empty",
          "vendor_portal_facts_waiting",
          "vendor_portal_banking_waiting",
          "vendor_portal_digits_not_here",
          "vendor_portal_paper_kind",
          "vendor_portal_cap",
          "vendor_portal_daily_limit",
          "vendor_portal_no_company",
          "vendor_portal_file_too_large",
          "vendor_portal_file_empty",
          "vendor_portal_file_type",
          "vendor_portal_file_not_kept",
          "vendor_portal_not_withdrawable",
          "vendor_portal_link_mismatch",
          "vendor_query_closed",
          "vendor_query_moved_on",
          "vendor_query_already_resolved",
          "vendor_query_owner_no_seat",
          "vendor_query_assign_not_yours",
          "vendor_query_subject_other_supplier",
          "vendor_query_vendor_archived",
          "vendor_query_arrival_not_a_message",
          "vendor_query_arrival_already_opened",
          "vendor_query_arrival_supplier_needed",
          "vendor_query_fact_not_available",
          "vendor_query_answer_empty",
          "vendor_notice_invitation_needs_link",
          "vendor_notice_link_not_invitation",
          "vendor_portal_company_needed",
          "vendor_portal_owner_unavailable",
          "vendor_portal_query_closed",
          "vendor_query_arrival_text_unreadable",
          "vendor_query_policy_expires_past",
          "vendor_query_no_company_reachable",
          "vendor_query_message_other_supplier",
          "vendor_query_arrival_quoted_only",
          "vendor_query_internal_question_not_open",
          "vendor_statement_database_refused",
          "vendor_query_portal_duplicate",
          "vendor_query_portal_open_cap",
          "vendor_query_portal_message_cap",
          "vendor_query_policy_expiry",
          "vendor_query_policy_ended",
          "vendor_query_export_too_many",
          "vendor_query_set_aside_origin",
          "vendor_query_follow_up_open",
          "vendor_statement_not_found",
          "vendor_statement_exists",
          "vendor_statement_document_used",
          "vendor_statement_file_format",
          "vendor_statement_file_too_large",
          "vendor_statement_missing_date",
          "vendor_statement_too_many_lines",
          "vendor_statement_not_in_review",
          "vendor_statement_changed",
          "vendor_statement_books_moved",
          "vendor_statement_no_supplier",
          "vendor_statement_supplier_differs",
          "vendor_statement_unchecked_figures",
          "vendor_statement_missing_header",
          "vendor_statement_too_many_bills",
          "vendor_statement_link_invalid",
          "vendor_statement_decline_reason",
          "vendor_statement_read_in_progress",
          "vendor_statement_read_attempts_used",
          "vendor_statement_nothing_to_read",
          "vendor_statement_not_accepted",
          "vendor_statement_nothing_to_ask",
          "vendor_statement_discard_seat",
          "vendor_account_statement_not_tied",
          "vendor_account_statement_too_many_rows",
          "vendor_account_statement_too_many_to_draw",
          "bill_question_topic_open",
          "bill_question_bill_void",
          "bill_question_outcome_required",
          "bill_question_outcome_bill_only",
          "ai_ceiling_not_whole_cents",
          "ai_ceiling_too_high",
          "ai_ceiling_below_budget",
          "ai_budget_above_ledger",
          "ai_use_cursor_invalid",
          "ai_use_range_too_long",
          "ai_use_export_too_many",
          "bill_capital_bill_not_posted",
          "bill_capital_line_not_capital",
          "bill_capital_set_aside",
          "bill_capital_over_line",
          "bill_capital_entity_differs",
          "bill_capital_account_differs",
          "bill_capital_changed",
          "bill_capital_line_locked",
          "bill_capital_void_blocked",
          "bill_capital_read_off",
          "bill_capital_read_attempts_used",
          "bill_capital_read_not_open",
          "bill_capital_asset_already_linked",
          "bill_capital_asset_mismatch",
          "bill_capital_look_back_future",
          "signal_capital_set_aside_own_work",
          "signal_confirmed_by_registration",
          "purchases_line_profile_too_few_bills",
          "purchases_line_profile_field_not_agreed",
          "purchases_line_profile_pattern_moved",
          "purchases_line_profile_one_live",
          "purchases_line_profile_replaces_nothing",
          "purchases_line_profile_not_typed",
          "purchases_line_profile_account_not_active",
          "bill_plan_not_open",
          "bill_plan_date_past",
          "bill_plan_date_far",
          "bill_due_account_needs_company",
          "bill_due_account_invalid",
          "bulk_act_needs_date",
          "payment_plan_account_invalid",
          "payment_plan_vendor_unknown",
          "payment_plan_window_invalid",
          "payment_plan_nothing_to_plan",
          "payment_plan_expired",
          "payment_plan_already_decided",
          "payment_plan_changed",
          "payment_plan_line_unknown",
          "payment_plan_lines_open",
          "payment_plan_not_recorded",
          "payment_run_release_policy_author",
          "run_policy_account_taken",
          "run_policy_expiry_too_far",
          "run_policy_currency_differs",
          "run_policy_not_in_force",
          "run_policy_decline_needed",
          "run_policy_decline_suggestion",
          "run_policy_replace_invalid",
          "month_end_commentary_month_invalid",
          "month_end_commentary_draft_exists",
          "month_end_commentary_replaced",
          "month_end_commentary_race",
          "month_end_commentary_read_failed",
          "month_end_commentary_database_refused",
          "month_end_commentary_not_draft",
          "month_end_commentary_audit_seat",
          "month_end_commentary_sentence_figure",
          "month_end_commentary_decisions_incomplete",
          "month_end_commentary_nothing_kept",
          "month_end_commentary_attempts",
          "month_end_commentary_export_too_many",
          "imported_history_suppliers_unplaced",
          "imported_history_suppliers_not_offered",
          "migration_file_not_readable",
          "migration_file_wrong_kind",
          "migration_no_open_payables",
          "migration_too_many_files",
          "migration_reading_too_many",
          "migration_banking_needs_sensitive",
          "migration_month_signed",
          "migration_month_no_payables",
          "migration_month_company",
          "migration_month_before_conversion",
          "migration_assistant_not_for_lens",
          "migration_finding_decided",
          "migration_finding_not_proposal",
          "migration_finding_stale",
          "migration_class_not_allowed",
          "migration_change_needs",
          "migration_export_too_many",
          "webhook_signing_not_configured",
          "webhook_url_invalid",
          "webhook_url_not_https",
          "webhook_url_private",
          "webhook_url_has_query",
          "webhook_url_has_credentials",
          "webhook_url_port",
          "webhook_url_duplicate",
          "webhook_endpoint_limit",
          "webhook_event_unknown",
          "webhook_endpoint_not_active",
          "webhook_endpoint_removed",
          "webhook_secret_already_shown",
          "webhook_delivery_not_dead",
          "webhook_test_too_soon",
          "webhook_export_too_many",
          "card_receipt_export_too_many",
          "bill_also_record_needs_card",
          "bill_seen_total_changed",
          "bill_vendor_is_own_company",
          "vendor_counterparty_has_bills",
          "vendor_merge_counterparty_own_bills",
          "intercompany_other_company_not_in_seat",
          "intercompany_pair_decided",
          "intercompany_pair_not_open",
          "intercompany_candidate_taken",
          "intercompany_candidate_not_eligible",
          "intercompany_unlink_has_elimination",
          "intercompany_customer_needs_approval",
          "intercompany_customer_company_taken",
          "intercompany_mirror_line_not_billable",
          "intercompany_mirror_too_many_lines",
          "intercompany_account_not_revenue",
          "intercompany_figures_moved",
          "intercompany_decline_needs_reason",
          "intercompany_elimination_exists",
          "intercompany_elimination_already_void",
          "intercompany_by_hand_not_needed",
          "intercompany_by_hand_needs_note",
          "intercompany_elimination_groups_differ",
          "intercompany_reading_off",
          "intercompany_reading_limit",
          "intercompany_export_too_many",
          "intercompany_look_back_company_required",
          "inbox_domain_apex",
          "inbox_domain_platform",
          "inbox_domain_malformed",
          "inbox_domain_company_has_one",
          "inbox_domain_taken",
          "inbox_domain_unavailable",
          "inbox_domain_not_verified",
          "inbox_domain_local_part_reserved",
          "inbox_domain_address_taken",
          "inbox_domain_invoices_mailbox",
          "inbox_domain_company_mismatch",
          "inbox_domain_removed_final",
          "payment_rail_not_approved",
          "payment_rail_not_configured",
          "payment_rail_off",
          "payment_rail_no_connection",
          "payment_rail_connection_unavailable",
          "payment_rail_provider_unavailable",
          "payment_rail_funding_source_refused",
          "payment_rail_funding_source_in_use",
          "payment_rail_funding_source_not_bound",
          "payment_rail_already_set",
          "payment_rail_run_not_released",
          "payment_rail_method",
          "payment_rail_currency",
          "payment_rail_run_lodged",
          "payment_rail_already_dispatched",
          "payment_rail_run_reversed",
          "payment_rail_run_moved",
          "payment_rail_confirmation_needed",
          "payment_rail_run_changed",
          "payment_rail_nothing_to_send",
          "payment_rail_nothing_to_stop",
          "payment_rail_sending_now",
          "payment_rail_outcome_unknown",
          "payment_rail_payees_not_payable",
          "payment_rail_in_flight",
          "payment_run_lodgement_dispatched",
          "payment_return_file_invalid",
          "payment_return_file_duplicate",
          "payment_return_file_not_a_notice",
          "payment_return_run_not_released",
          "payment_return_run_not_eft",
          "payment_return_proposal_decided",
          "payment_run_outcome_with_open_returns",
          "vendor_query_arrival_changed",
          "vendor_statement_file_missing",
          "purchases_custom_field_values_bill_void",
          "purchases_custom_field_values_kind_unknown",
          "vendor_reopen_archived",
          "vendor_reopen_nothing_to_reopen",
          "vendor_reopen_decided_again",
          "vendor_restore_moved_on",
          "vendor_registration_check_replaced",
          "vendor_registration_stated_changed",
          "vendor_registration_earlier_check_unusable",
          "vendor_credit_moved_on",
          "payment_run_policy_pass_not_run",
          "payment_run_policy_pass_run_moved",
          "vendor_line_profile_not_proposal",
          "vendor_line_profile_not_dismissed",
          "vendor_line_profile_not_restorable",
          "vendor_line_profile_was_discarded_proposal",
          "inbox_suggestion_decline_moved_on",
          "bill_still_owed_moved_on",
          "bill_feed_decline_moved_on",
          "bill_submission_moved_on",
          "bill_prepaid_early_end_moved_on"
        ],
        "description": "The values listed in `x-extensible-enum` are the ones known today. New values can appear without a new release, so handle an unknown one as you would an unexpected state, not as a failure to parse."
      },
      "CreatePaymentPlanResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "entityTimeZone": {
            "type": "string"
          },
          "account": {
            "$ref": "#/components/schemas/AccountOption1"
          },
          "state": {
            "type": "string",
            "enum": [
              "PROPOSED",
              "APPLIED",
              "DISCARDED",
              "EXPIRED"
            ]
          },
          "asOf": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "throughDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "keepMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "balanceMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "readBy": {
            "type": "string",
            "enum": [
              "FORM",
              "PRODUCT",
              "MODEL"
            ]
          },
          "promptVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "createdAt": {
            "type": "string",
            "minLength": 20
          },
          "expiresAt": {
            "type": "string",
            "minLength": 20
          },
          "decidedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "decidedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "moreBills": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totals": {
            "type": "object",
            "properties": {
              "plannedCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "plannedMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              "leftOutCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "leftOutMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              "keptDiscountMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              "afterPlanBalanceMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              }
            },
            "required": [
              "plannedCount",
              "plannedMinor",
              "leftOutCount",
              "leftOutMinor",
              "keptDiscountMinor",
              "afterPlanBalanceMinor"
            ],
            "additionalProperties": false
          },
          "runways": {
            "type": "object",
            "properties": {
              "today": {
                "$ref": "#/components/schemas/RunwayOption1"
              },
              "withPlan": {
                "$ref": "#/components/schemas/RunwayOption1"
              }
            },
            "required": [
              "today",
              "withPlan"
            ],
            "additionalProperties": false
          },
          "lines": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "position": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                },
                "bill": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "number": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "href": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "number",
                    "href"
                  ],
                  "additionalProperties": false
                },
                "vendor": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "displayName": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "displayName"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "openMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                "currency": {
                  "type": "string",
                  "pattern": "^[A-Z]{3}$"
                },
                "dueOn": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "tier": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    },
                    {
                      "type": "number",
                      "const": 3
                    }
                  ]
                },
                "discount": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "minor": {
                          "type": "string",
                          "pattern": "^-?\\d+$"
                        },
                        "closesOn": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        }
                      },
                      "required": [
                        "minor",
                        "closesOn"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "interestPerDayMinor": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "proposedOn": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "DISCOUNT_KEPT",
                    "ON_DUE_DATE",
                    "ALREADY_DUE",
                    "YOUR_DATE",
                    "CASH_SHORT",
                    "NOT_PAYABLE",
                    "POSSIBLE_DUPLICATE",
                    "YOUR_EXCLUSION",
                    "DECLINED_BEFORE"
                  ]
                },
                "decision": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "APPLIED",
                        "CHANGED",
                        "DECLINED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decidedOn": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "declineClass": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "NOT_NOW",
                        "DISPUTED",
                        "PAID_OTHER_WAY",
                        "OTHER"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "declineNote": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "findings": {
                  "$ref": "#/components/schemas/Findings"
                }
              },
              "required": [
                "id",
                "position",
                "bill",
                "vendor",
                "openMinor",
                "currency",
                "dueOn",
                "tier",
                "discount",
                "interestPerDayMinor",
                "proposedOn",
                "reason",
                "decision",
                "decidedOn",
                "declineClass",
                "declineNote",
                "findings"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "entityId",
          "entityName",
          "entityTimeZone",
          "account",
          "state",
          "asOf",
          "throughDate",
          "keepMinor",
          "balanceMinor",
          "readBy",
          "promptVersion",
          "createdBy",
          "createdAt",
          "expiresAt",
          "decidedBy",
          "decidedAt",
          "moreBills",
          "totals",
          "runways",
          "lines"
        ],
        "additionalProperties": false
      },
      "Data4": {
        "type": "object",
        "properties": {
          "object": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "paymentRun"
              },
              "id": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false
          },
          "href": {
            "type": "string",
            "format": "starts_with",
            "pattern": "^\\/v1\\/.*"
          }
        },
        "required": [
          "object",
          "href"
        ],
        "additionalProperties": false
      },
      "Decision": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "DISMISSED",
                  "CONFIRMED"
                ]
              },
              "by": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              "at": {
                "type": "string",
                "minLength": 20
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "state",
              "by",
              "at",
              "note"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "Deductions": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "CREDIT",
                "DISCOUNT",
                "WITHHOLDING"
              ]
            },
            "amountMinor": {
              "type": "string",
              "pattern": "^-?\\d+$"
            },
            "reason": {
              "type": "string"
            },
            "account": {
              "$ref": "#/components/schemas/Account"
            },
            "vendorCredit": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "number": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "number"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "kind",
            "amountMinor",
            "reason",
            "account",
            "vendorCredit"
          ],
          "additionalProperties": false
        }
      },
      "Deposit": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "accountId": {
                "type": "string"
              },
              "accountCode": {
                "type": "string"
              },
              "accountName": {
                "type": "string"
              },
              "refundedMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              "onHandMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              }
            },
            "required": [
              "accountId",
              "accountCode",
              "accountName",
              "refundedMinor",
              "onHandMinor"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "DraftRunPolicyResponsePart1": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "null"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DraftRunPolicyResponsePart1"
            }
          },
          {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/DraftRunPolicyResponsePart1"
            }
          }
        ]
      },
      "Field": {
        "type": "string",
        "enum": [
          "ORIGINATOR_ID",
          "FILE_CREATION_NUMBER",
          "CREATION_DATE",
          "FUNDS_DATE",
          "DESTINATION_DATA_CENTRE",
          "CURRENCY",
          "RECORD_LAYOUT",
          "TOTALS",
          "LINE_ENDING",
          "TEST_MARKER",
          "ORIGINATOR_NAMES",
          "ACCOUNT_ROUTING",
          "OTHER"
        ]
      },
      "Findings": {
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "SLIPPED"
                },
                "daysAgo": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "kind",
                "daysAgo"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "AFTER_DISCOUNT"
                },
                "discountOn": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "lostMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                }
              },
              "required": [
                "kind",
                "discountOn",
                "lostMinor"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "AFTER_DUE"
                },
                "days": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                },
                "interestPerDayMinor": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "days",
                "interestPerDayMinor"
              ],
              "additionalProperties": false
            }
          ]
        }
      },
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "ledgerId": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "x-extensible-enum": [
              "RECORD_IMPORT_READ",
              "RECORD_IMPORT_APPLY",
              "LIST_EXPORT",
              "AUDIT_PACKAGE",
              "YEAR_END_FILE",
              "PAYMENT_RUN_DISPATCH",
              "BULK_OPERATION",
              "UNDO_GROUP",
              "FULL_EXPORT",
              "WAREHOUSE_BACKFILL",
              "TEST_COPY",
              "WORKFLOW_RUN",
              "VENDOR_PRIVACY_PACK",
              "CAPITAL_LOOK_BACK",
              "VENDOR_PAPER_APPLY",
              "VENDOR_MERGE_APPROVAL",
              "SETTLEMENT_PROPOSE",
              "SALES_INVOICE_IMPORT",
              "WORKSPACE_INVITATIONS_SEND",
              "PROVIDER_TOKEN_REFRESH",
              "PROJECTION_REPLAY",
              "CHART_IMPORT_APPLY",
              "WORKSPACE_IMPORT_APPLY",
              "CSV_IMPORT",
              "CUSTOM_FIELD_INDEX",
              "PROMOTION_APPLY",
              "PERIOD_CLOSE"
            ],
            "description": "The values listed in `x-extensible-enum` are the ones known today. New values can appear without a new release, so handle an unknown one as you would an unexpected state, not as a failure to parse."
          },
          "state": {
            "type": "string",
            "enum": [
              "QUEUED",
              "RUNNING",
              "CANCELLING",
              "STALLED",
              "SUCCEEDED",
              "FAILED",
              "CANCELLED"
            ]
          },
          "done": {
            "type": "boolean"
          },
          "subject": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "id",
                  "label"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "startedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "app": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "door": {
            "type": "string",
            "enum": [
              "web",
              "rest",
              "mcp"
            ]
          },
          "progress": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string",
                "enum": [
                  "rows",
                  "records",
                  "items",
                  "sections",
                  "payments",
                  "tables"
                ]
              },
              "done": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "failed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "total": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "percent": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "unit",
              "done",
              "failed",
              "total",
              "percent"
            ],
            "additionalProperties": false
          },
          "queuedAt": {
            "type": "string",
            "minLength": 20
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "finishedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "heartbeatAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "queuePosition": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "cancel": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "requestedAt": {
                    "type": "string",
                    "minLength": 20
                  },
                  "requestedBy": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "late": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "requestedAt",
                  "requestedBy",
                  "reason",
                  "late"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "$ref": "#/components/schemas/Code"
                  },
                  "message": {
                    "type": "string"
                  },
                  "remedy": {
                    "type": "string"
                  },
                  "retryable": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "code",
                  "message",
                  "remedy",
                  "retryable"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "x-extensible-enum": [
                      "RECORD_IMPORT_READ",
                      "RECORD_IMPORT_APPLY",
                      "LIST_EXPORT",
                      "AUDIT_PACKAGE",
                      "YEAR_END_FILE",
                      "PAYMENT_RUN_DISPATCH",
                      "BULK_OPERATION",
                      "UNDO_GROUP",
                      "FULL_EXPORT",
                      "WAREHOUSE_BACKFILL",
                      "TEST_COPY",
                      "WORKFLOW_RUN",
                      "VENDOR_PRIVACY_PACK",
                      "VENDOR_PAPER_APPLY",
                      "VENDOR_MERGE_APPROVAL",
                      "CAPITAL_LOOK_BACK",
                      "SETTLEMENT_PROPOSE",
                      "PROVIDER_TOKEN_REFRESH",
                      "WORKSPACE_INVITATIONS_SEND",
                      "PROJECTION_REPLAY",
                      "SALES_INVOICE_IMPORT",
                      "CHART_IMPORT_APPLY",
                      "WORKSPACE_IMPORT_APPLY",
                      "CSV_IMPORT",
                      "CUSTOM_FIELD_INDEX",
                      "PROMOTION_APPLY",
                      "PERIOD_CLOSE"
                    ],
                    "description": "Which kind of job this result is for. The values listed in `x-extensible-enum` are the ones known today. New values can appear without a new release, so handle an unknown one as you would an unexpected state, not as a failure to parse."
                  }
                },
                "required": [
                  "kind"
                ],
                "additionalProperties": true,
                "x-open-by-reference": true,
                "description": "What the job made: ids and counts. The fields depend on `kind`; `x-known-variants` lists the shapes known today. A kind added later is not a change to this contract.",
                "x-known-variants": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "RECORD_IMPORT_READ"
                      },
                      "batchId": {
                        "type": "string"
                      },
                      "rowsRead": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "batchId",
                      "rowsRead"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "RECORD_IMPORT_APPLY"
                      },
                      "importId": {
                        "type": "string"
                      },
                      "applied": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "refused": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "importId",
                      "applied",
                      "refused"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "LIST_EXPORT"
                      },
                      "exportId": {
                        "type": "string"
                      },
                      "rows": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "exportId",
                      "rows"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "AUDIT_PACKAGE"
                      },
                      "packageId": {
                        "type": "string"
                      },
                      "records": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "packageId",
                      "records"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "YEAR_END_FILE"
                      },
                      "yearEndFileId": {
                        "type": "string"
                      },
                      "sections": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "yearEndFileId",
                      "sections"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "PAYMENT_RUN_DISPATCH"
                      },
                      "paymentRunId": {
                        "type": "string"
                      },
                      "submitted": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "failed": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "paymentRunId",
                      "submitted",
                      "failed"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "BULK_OPERATION"
                      },
                      "operation": {
                        "type": "string"
                      },
                      "succeeded": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "failed": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "skipped": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "operation",
                      "succeeded",
                      "failed",
                      "skipped"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "UNDO_GROUP"
                      },
                      "undoGroupId": {
                        "type": "string"
                      },
                      "direction": {
                        "type": "string",
                        "enum": [
                          "undo",
                          "redo"
                        ]
                      },
                      "groupState": {
                        "type": "string",
                        "enum": [
                          "IN_PLACE",
                          "UNDONE",
                          "PARTLY_UNDONE",
                          "UNDO_PROPOSED"
                        ]
                      },
                      "undone": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "refused": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "staying": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "notUndone": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "refusals": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "$ref": "#/components/schemas/Code"
                            },
                            "message": {
                              "type": "string"
                            },
                            "remedy": {
                              "type": "string"
                            },
                            "ordinal": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "operation": {
                              "type": "string"
                            },
                            "recordId": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "remedy",
                            "ordinal",
                            "operation",
                            "recordId"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "kind",
                      "undoGroupId",
                      "direction",
                      "groupState",
                      "undone",
                      "refused",
                      "staying",
                      "notUndone",
                      "refusals"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "FULL_EXPORT"
                      },
                      "requestId": {
                        "type": "string"
                      },
                      "tables": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "requestId",
                      "tables"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "WAREHOUSE_BACKFILL"
                      },
                      "destinationId": {
                        "type": "string"
                      },
                      "tables": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "rows": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "destinationId",
                      "tables",
                      "rows"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "TEST_COPY"
                      },
                      "testCopyId": {
                        "type": "string"
                      },
                      "tables": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "testCopyId",
                      "tables"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "WORKFLOW_RUN"
                      },
                      "workflowRunId": {
                        "type": "string"
                      },
                      "stepsDone": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "workflowRunId",
                      "stepsDone"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "VENDOR_PRIVACY_PACK"
                      },
                      "requestId": {
                        "type": "string"
                      },
                      "sections": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "requestId",
                      "sections"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "VENDOR_PAPER_APPLY"
                      },
                      "changed": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "changed"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "VENDOR_MERGE_APPROVAL"
                      },
                      "mergeId": {
                        "type": "string"
                      },
                      "billsMoved": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "mergeId",
                      "billsMoved"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "examined": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "raised": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "alreadyRaised": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "cleared": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "belowFloor": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "notCapital": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "noRate": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "kind": {
                        "type": "string",
                        "const": "CAPITAL_LOOK_BACK"
                      },
                      "entityId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "examined",
                      "raised",
                      "alreadyRaised",
                      "cleared",
                      "belowFloor",
                      "notCapital",
                      "noRate",
                      "kind",
                      "entityId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "SETTLEMENT_PROPOSE"
                      },
                      "settlementId": {
                        "type": "string"
                      },
                      "proposed": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "alreadyProposed": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "taxMinor": {
                        "type": "string",
                        "pattern": "^-?\\d+$"
                      }
                    },
                    "required": [
                      "kind",
                      "settlementId",
                      "proposed",
                      "alreadyProposed",
                      "taxMinor"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "PROVIDER_TOKEN_REFRESH"
                      },
                      "connectionId": {
                        "type": "string"
                      },
                      "provider": {
                        "type": "string",
                        "enum": [
                          "QBO",
                          "XERO"
                        ]
                      },
                      "outcome": {
                        "type": "string",
                        "enum": [
                          "REFRESHED",
                          "ALREADY_FRESH"
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "connectionId",
                      "provider",
                      "outcome"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "WORKSPACE_INVITATIONS_SEND"
                      },
                      "importId": {
                        "type": "string"
                      },
                      "sent": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "refused": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "notConfigured": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "queued": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "throttled": {
                        "type": "boolean"
                      },
                      "resumesAt": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "importId",
                      "sent",
                      "refused",
                      "notConfigured",
                      "queued",
                      "throttled",
                      "resumesAt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "PROJECTION_REPLAY"
                      },
                      "projection": {
                        "type": "string",
                        "enum": [
                          "entity-summary",
                          "document-index",
                          "webhooks",
                          "workflow-trigger"
                        ]
                      },
                      "appliedFrom": {
                        "type": "string"
                      },
                      "appliedThrough": {
                        "type": "string"
                      },
                      "applied": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "projection",
                      "appliedFrom",
                      "appliedThrough",
                      "applied"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "SALES_INVOICE_IMPORT"
                      },
                      "entityId": {
                        "type": "string"
                      },
                      "imported": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "refused": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "customersCreated": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "refusals": {
                        "maxItems": 25,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "row": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "number": {
                              "type": "string"
                            },
                            "reason": {
                              "type": "string"
                            },
                            "tax": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "chargedMinor": {
                                      "type": "string"
                                    },
                                    "determinedMinor": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "chargedMinor",
                                    "determinedMinor"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "row",
                            "number",
                            "reason",
                            "tax"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "kind",
                      "entityId",
                      "imported",
                      "refused",
                      "customersCreated",
                      "refusals"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "CHART_IMPORT_APPLY"
                      },
                      "importId": {
                        "type": "string"
                      },
                      "accountsCreated": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "dimensionValuesCreated": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "dimensionPoliciesCreated": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "dimensionTypeCode": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "declinedGroupCount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "accountsWithoutGifiCount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "importId",
                      "accountsCreated",
                      "dimensionValuesCreated",
                      "dimensionPoliciesCreated",
                      "dimensionTypeCode",
                      "declinedGroupCount",
                      "accountsWithoutGifiCount"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "WORKSPACE_IMPORT_APPLY"
                      },
                      "importId": {
                        "type": "string"
                      },
                      "applied": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "refused": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "sendJobId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "importId",
                      "applied",
                      "refused",
                      "sendJobId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "CSV_IMPORT"
                      },
                      "connectionId": {
                        "type": "string"
                      },
                      "syncRunId": {
                        "type": "string"
                      },
                      "inserted": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "duplicates": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "total": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "evidenceKey": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "connectionId",
                      "syncRunId",
                      "inserted",
                      "duplicates",
                      "total",
                      "evidenceKey"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "CUSTOM_FIELD_INDEX"
                      },
                      "definitionId": {
                        "type": "string"
                      },
                      "recordsIndexed": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "definitionId",
                      "recordsIndexed"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "PROMOTION_APPLY"
                      },
                      "promotionId": {
                        "type": "string"
                      },
                      "changesApplied": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "indexJobsStarted": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "kind",
                      "promotionId",
                      "changesApplied",
                      "indexJobsStarted"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "PERIOD_CLOSE"
                      },
                      "closePeriodId": {
                        "type": "string"
                      },
                      "periodYear": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "periodMonth": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12
                      },
                      "lockId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "closePeriodId",
                      "periodYear",
                      "periodMonth",
                      "lockId"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "undoGroupId": {
            "type": [
              "string",
              "null"
            ]
          },
          "traceId": {
            "type": "string",
            "pattern": "^[0-9a-f]{32}$"
          },
          "may": {
            "type": "object",
            "properties": {
              "cancel": {
                "type": "boolean"
              },
              "resume": {
                "type": "boolean"
              }
            },
            "required": [
              "cancel",
              "resume"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "ledgerId",
          "kind",
          "state",
          "done",
          "subject",
          "startedBy",
          "app",
          "door",
          "progress",
          "queuedAt",
          "startedAt",
          "finishedAt",
          "heartbeatAt",
          "queuePosition",
          "cancel",
          "error",
          "result",
          "undoGroupId",
          "traceId",
          "may"
        ],
        "additionalProperties": false
      },
      "Kind4": {
        "type": "string",
        "enum": [
          "DUPLICATE_BILL",
          "HOLDER_NAME_MISMATCH",
          "NO_EVIDENCE",
          "NEW_SENDER_DOMAIN",
          "FIRST_TIME_SENDER_DOMAIN",
          "CHANGE_BEFORE_A_LARGE_BILL",
          "SHORT_INTERVAL",
          "SHARED_ACCOUNT",
          "PRINTED_ACCOUNT_DIFFERS",
          "DOCUMENT_EXPIRING",
          "AGREEMENT_RENEWING",
          "SLIP_IDENTITY_INCOMPLETE",
          "SLIP_KIND_QUESTIONED",
          "EXPECTED_BILL_MISSING",
          "RECURRING_AMOUNT_MOVED",
          "TAX_TREATMENT_DRIFT",
          "PRICE_CREEP",
          "CAPITAL_PURCHASE"
        ]
      },
      "Kind5": {
        "type": "string",
        "enum": [
          "RECEIVED",
          "COULD_NOT_READ",
          "REFUSED",
          "QUARANTINED",
          "DIGEST",
          "HANDOFF",
          "REMITTANCE_ADVICE",
          "REMITTANCE_REVERSAL",
          "BILL_APPROVED",
          "BILL_HELD",
          "BILL_DECLINED",
          "CORRECTION_ASKED",
          "ADDRESS_CLOSING",
          "BANKING_CHANGED",
          "DOCUMENT_REQUESTED",
          "NON_RENEWAL_NOTICE",
          "SLIP_COPY",
          "SLIP_IDENTITY_ASK",
          "HELD",
          "PURCHASE_ORDER",
          "PURCHASE_ORDER_CANCELLED",
          "PORTAL_INVITATION",
          "QUERY_ANSWER",
          "QUERY_ASKED",
          "STATEMENT_QUERY",
          "ACCOUNT_STATEMENT",
          "PORTAL_DECISION"
        ]
      },
      "Line": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "postedOn": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "amountMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "description": {
            "type": "string"
          },
          "counterparty": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "NEW",
              "PROPOSED",
              "MATCHED",
              "IGNORED"
            ]
          },
          "ageDays": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "postedOn",
          "amountMinor",
          "currency",
          "description",
          "counterparty",
          "reference",
          "state",
          "ageDays"
        ],
        "additionalProperties": false
      },
      "Lines": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "billId": {
              "type": "string"
            },
            "billNumber": {
              "type": [
                "string",
                "null"
              ]
            },
            "billDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "billTotalMinor": {
              "type": "string",
              "pattern": "^-?\\d+$"
            },
            "appliedMinor": {
              "type": "string",
              "pattern": "^-?\\d+$"
            },
            "deductions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "CREDIT",
                      "DISCOUNT",
                      "WITHHOLDING"
                    ]
                  },
                  "amountMinor": {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "sourceLabel": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "discount": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "bp": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "days": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "discountDate": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          }
                        },
                        "required": [
                          "bp",
                          "days",
                          "discountDate"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kind",
                  "amountMinor",
                  "reason",
                  "sourceLabel",
                  "discount"
                ],
                "additionalProperties": false
              }
            },
            "paidMinor": {
              "type": "string",
              "pattern": "^-?\\d+$"
            },
            "leftOpenMinor": {
              "type": "string",
              "pattern": "^-?\\d+$"
            },
            "shortReason": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "billId",
            "billNumber",
            "billDate",
            "billTotalMinor",
            "appliedMinor",
            "deductions",
            "paidMinor",
            "leftOpenMinor",
            "shortReason"
          ],
          "additionalProperties": false
        }
      },
      "LinesItem2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "billId": {
            "type": "string"
          },
          "supplierName": {
            "type": "string"
          },
          "number": {
            "type": [
              "string",
              "null"
            ]
          },
          "rank": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "decision": {
            "type": "string",
            "enum": [
              "TAKEN",
              "SKIPPED"
            ]
          },
          "skipReason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SkipReasonOption1"
              },
              {
                "type": "null"
              }
            ]
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "openMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "cashMinor": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          }
        },
        "required": [
          "id",
          "billId",
          "supplierName",
          "number",
          "rank",
          "decision",
          "skipReason",
          "detail",
          "openMinor",
          "cashMinor",
          "currency"
        ],
        "additionalProperties": false
      },
      "ListBankAccountsResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "glAccount": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "code",
              "name"
            ],
            "additionalProperties": false
          },
          "originator": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "financialAccountId": {
                    "type": "string"
                  },
                  "originatorId": {
                    "type": "string"
                  },
                  "shortName": {
                    "type": "string"
                  },
                  "longName": {
                    "type": "string"
                  },
                  "destinationDataCentre": {
                    "type": "string"
                  },
                  "nextFileCreationNumber": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9999
                  },
                  "configuredBy": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "updatedAt": {
                    "type": "string",
                    "minLength": 20
                  },
                  "verification": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "changeId": {
                            "type": "string"
                          },
                          "verifiedBy": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "verifiedAt": {
                            "type": "string",
                            "minLength": 20
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "CALLBACK_KNOWN_NUMBER",
                              "IN_PERSON",
                              "OTHER"
                            ]
                          }
                        },
                        "required": [
                          "changeId",
                          "verifiedBy",
                          "verifiedAt",
                          "method"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pendingChange": {
                    "$ref": "#/components/schemas/PendingChange"
                  }
                },
                "required": [
                  "id",
                  "financialAccountId",
                  "originatorId",
                  "shortName",
                  "longName",
                  "destinationDataCentre",
                  "nextFileCreationNumber",
                  "configuredBy",
                  "updatedAt",
                  "verification",
                  "pendingChange"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "pendingChange": {
            "$ref": "#/components/schemas/PendingChange"
          },
          "kind": {
            "type": "string",
            "enum": [
              "BANK",
              "CARD",
              "STRIPE"
            ]
          },
          "connection": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "displayName",
                  "provider"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "stripeAccountId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "entityId",
          "entityName",
          "displayName",
          "currency",
          "glAccount",
          "originator",
          "pendingChange",
          "kind"
        ],
        "additionalProperties": false
      },
      "ListBankFileTestsResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "paymentRunId": {
            "type": "string"
          },
          "bankProfileId": {
            "type": "string"
          },
          "profileRevision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "current": {
            "type": "boolean"
          },
          "fileName": {
            "type": "string"
          },
          "fileCreationNumber": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9999
          },
          "consumedFileNumber": {
            "type": "boolean"
          },
          "fileSha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "sizeBytes": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "creditCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "creditTotalMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "markedAsTest": {
            "type": "boolean"
          },
          "checkVersion": {
            "type": "string"
          },
          "createdBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "createdAt": {
            "type": "string",
            "minLength": 20
          },
          "answer": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "verdict": {
                    "type": "string",
                    "enum": [
                      "ACCEPTED",
                      "REJECTED"
                    ]
                  },
                  "recordedBy": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "recordedAt": {
                    "type": "string",
                    "minLength": 20
                  },
                  "portalReference": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rejectedFields": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Field"
                    }
                  },
                  "evidence": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "documentId": {
                            "type": "string"
                          },
                          "fileName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "documentId",
                          "fileName"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "portalText": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "draft": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "promptVersion": {
                            "type": "string"
                          },
                          "proposedOutcome": {
                            "type": "string",
                            "enum": [
                              "ACCEPTED",
                              "REJECTED",
                              "UNCLEAR"
                            ]
                          },
                          "agreed": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "promptVersion",
                          "proposedOutcome",
                          "agreed"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "verdict",
                  "recordedBy",
                  "recordedAt",
                  "portalReference",
                  "note",
                  "rejectedFields",
                  "evidence",
                  "portalText",
                  "draft"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "entityTimeZone": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "paymentRunId",
          "bankProfileId",
          "profileRevision",
          "current",
          "fileName",
          "fileCreationNumber",
          "consumedFileNumber",
          "fileSha256",
          "sizeBytes",
          "creditCount",
          "creditTotalMinor",
          "markedAsTest",
          "checkVersion",
          "createdBy",
          "createdAt",
          "answer",
          "entityTimeZone"
        ],
        "additionalProperties": false
      },
      "ListBankProfilesResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "bankName": {
            "type": "string"
          },
          "guide": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "edition": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "title",
              "edition",
              "url"
            ],
            "additionalProperties": false
          },
          "conventions": {
            "type": "object",
            "properties": {
              "lineEnding": {
                "type": "string",
                "enum": [
                  "CRLF",
                  "LF",
                  "NONE"
                ]
              },
              "lineEndingPage": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "maxDaysAhead": {
                "type": "integer",
                "minimum": 1,
                "maximum": 14
              },
              "maxDaysAheadPage": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "acceptsUsd": {
                "type": "boolean"
              },
              "acceptsUsdPage": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "testMarker": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "testMarkerPage": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "testConsumesFileNumber": {
                "type": "boolean"
              },
              "testConsumesFileNumberPage": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "lineEnding",
              "lineEndingPage",
              "maxDaysAhead",
              "maxDaysAheadPage",
              "acceptsUsd",
              "acceptsUsdPage",
              "testMarker",
              "testMarkerPage",
              "testConsumesFileNumber",
              "testConsumesFileNumberPage"
            ],
            "additionalProperties": false
          },
          "revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "proof": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "NO_PROFILE",
                  "NOT_TESTED",
                  "AWAITING_ANSWER",
                  "REFUSED",
                  "ACCEPTED"
                ]
              },
              "profile": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "bankName": {
                        "type": "string"
                      },
                      "revision": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "bankName",
                      "revision"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "acceptance": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "testId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "provedByRunId": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "fileCreationNumber": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "recordedBy": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      },
                      "recordedAt": {
                        "type": "string",
                        "minLength": 20
                      },
                      "portalReference": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "testId",
                      "provedByRunId",
                      "fileCreationNumber",
                      "recordedBy",
                      "recordedAt",
                      "portalReference"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastTest": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "testId": {
                        "type": "string"
                      },
                      "fileCreationNumber": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "createdAt": {
                        "type": "string",
                        "minLength": 20
                      },
                      "verdict": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "ACCEPTED",
                              "REJECTED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "testId",
                      "fileCreationNumber",
                      "createdAt",
                      "verdict"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "earlierAcceptance": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "revision": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "recordedAt": {
                        "type": "string",
                        "minLength": 20
                      }
                    },
                    "required": [
                      "revision",
                      "recordedAt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "state",
              "profile",
              "acceptance",
              "lastTest",
              "earlierAcceptance"
            ],
            "additionalProperties": false
          },
          "accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "financialAccountId": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "entityName": {
                  "type": "string"
                }
              },
              "required": [
                "financialAccountId",
                "displayName",
                "entityName"
              ],
              "additionalProperties": false
            }
          },
          "createdBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "createdAt": {
            "type": "string",
            "minLength": 20
          },
          "updatedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "updatedAt": {
            "type": "string",
            "minLength": 20
          },
          "entityTimeZone": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "bankName",
          "guide",
          "conventions",
          "revision",
          "proof",
          "accounts",
          "createdBy",
          "createdAt",
          "updatedBy",
          "updatedAt",
          "entityTimeZone"
        ],
        "additionalProperties": false
      },
      "ListPaymentReturnProposalsResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "PROPOSED",
              "CONFIRMED",
              "DISMISSED",
              "SUPERSEDED"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "BANK_FILE",
              "RAIL"
            ]
          },
          "returnCode": {
            "type": "string",
            "enum": [
              "R900",
              "R902",
              "R903",
              "R904",
              "R905",
              "R909",
              "R910",
              "R911",
              "R912",
              "R922",
              "R990",
              "OTHER"
            ]
          },
          "returnLabel": {
            "type": "string"
          },
          "returnNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "returnedOn": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "flagsBanking": {
            "type": "boolean"
          },
          "payment": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "sequence": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "amountMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "vendor": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              "bills": {
                "maxItems": 5,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "number": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "number"
                  ],
                  "additionalProperties": false
                }
              },
              "billCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "id",
              "sequence",
              "amountMinor",
              "currency",
              "vendor",
              "bills",
              "billCount"
            ],
            "additionalProperties": false
          },
          "run": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "paymentDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "entityId": {
                "type": "string"
              },
              "entityName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "paymentDate",
              "entityId",
              "entityName"
            ],
            "additionalProperties": false
          },
          "file": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "fileName": {
                    "type": "string"
                  },
                  "recordNumber": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "segmentNumber": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 6
                  }
                },
                "required": [
                  "id",
                  "fileName",
                  "recordNumber",
                  "segmentNumber"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "proposedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "proposedAt": {
            "type": "string",
            "minLength": 20
          },
          "decidedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "decidedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "decisionNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "earlierDismissal": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "decidedBy": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "decidedAt": {
                    "type": "string",
                    "minLength": 20
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "decidedBy",
                  "decidedAt",
                  "note"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "source",
          "returnCode",
          "returnLabel",
          "returnNote",
          "returnedOn",
          "flagsBanking",
          "payment",
          "run",
          "file",
          "proposedBy",
          "proposedAt",
          "decidedBy",
          "decidedAt",
          "decisionNote",
          "earlierDismissal"
        ],
        "additionalProperties": false
      },
      "ListPaymentTermsResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "netDays": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "discountBp": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "discountDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "interestMonthlyBp": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "interestAnnualBp": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "isDefault": {
            "type": "boolean"
          },
          "appliesTo": {
            "type": "string",
            "enum": [
              "SALES",
              "PURCHASES",
              "BOTH"
            ]
          },
          "discountAccount": {
            "$ref": "#/components/schemas/Account"
          },
          "customerCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "vendorCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "createdBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "minLength": 20
          },
          "updatedAt": {
            "type": "string",
            "minLength": 20
          }
        },
        "required": [
          "id",
          "name",
          "netDays",
          "discountBp",
          "discountDays",
          "interestMonthlyBp",
          "interestAnnualBp",
          "isDefault",
          "appliesTo",
          "discountAccount",
          "customerCount",
          "createdBy",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ListReconCertificationsResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "financialAccountId": {
            "type": "string"
          },
          "periodYear": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "periodMonth": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12
          },
          "periodLabel": {
            "type": "string"
          },
          "statementBalanceMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "ledgerBalanceMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "differenceMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "exceptionCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "exceptionTotalMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "exceptions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sourceTransactionId": {
                  "type": "string"
                },
                "postedOn": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "amountMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                "description": {
                  "type": "string"
                },
                "carriedAs": {
                  "type": "string",
                  "enum": [
                    "UNMATCHED",
                    "PROPOSED",
                    "MATCHED_TO_REVERSED"
                  ]
                }
              },
              "required": [
                "sourceTransactionId",
                "postedOn",
                "amountMinor",
                "description",
                "carriedAs"
              ],
              "additionalProperties": false
            }
          },
          "exceptionsTruncated": {
            "type": "boolean"
          },
          "excludedCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "excludedTotalMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "excludedForeignCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "excludedForeignCurrencies": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "certifiedAt": {
            "type": "string",
            "minLength": 20
          },
          "certifiedBy": {
            "type": "string"
          },
          "withdrawnAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "withdrawnBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "withdrawReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "currentLedgerBalanceMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "stale": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "financialAccountId",
          "periodYear",
          "periodMonth",
          "periodLabel",
          "statementBalanceMinor",
          "ledgerBalanceMinor",
          "differenceMinor",
          "exceptionCount",
          "exceptionTotalMinor",
          "exceptions",
          "exceptionsTruncated",
          "excludedCount",
          "excludedTotalMinor",
          "excludedForeignCount",
          "excludedForeignCurrencies",
          "note",
          "certifiedAt",
          "certifiedBy",
          "withdrawnAt",
          "withdrawnBy",
          "withdrawReason",
          "currentLedgerBalanceMinor",
          "stale"
        ],
        "additionalProperties": false
      },
      "ListRemittanceChangesResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "BANK_DETAILS",
              "HOW_TO_PAY",
              "PAYMENT_LINK"
            ]
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "language": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "en",
                  "fr"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "PROPOSED",
              "VERIFIED",
              "REJECTED",
              "WITHDRAWN",
              "EXPIRED"
            ]
          },
          "proposedSummary": {
            "type": "string"
          },
          "currentSummary": {
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "proposedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "proposedAt": {
            "type": "string",
            "minLength": 20
          },
          "decidedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "decidedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "decisionNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "type": "string",
            "minLength": 20
          },
          "mayVerify": {
            "type": "boolean"
          },
          "whyNot": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "entityId",
          "entityName",
          "currency",
          "language",
          "status",
          "proposedSummary",
          "currentSummary",
          "note",
          "proposedBy",
          "proposedAt",
          "decidedBy",
          "decidedAt",
          "decisionNote",
          "expiresAt",
          "mayVerify",
          "whyNot"
        ],
        "additionalProperties": false
      },
      "ListSettlementRegistrationsResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "processor": {
            "type": "string",
            "enum": [
              "STRIPE",
              "SHOPIFY",
              "LIGHTSPEED"
            ]
          },
          "connectionId": {
            "type": [
              "string",
              "null"
            ]
          },
          "connectionName": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "glAccount": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "code",
              "name"
            ],
            "additionalProperties": false
          },
          "clearingAccount": {
            "$ref": "#/components/schemas/Account"
          },
          "feeAccount": {
            "$ref": "#/components/schemas/Account"
          },
          "revenueAccount": {
            "$ref": "#/components/schemas/Account"
          },
          "bankAccount": {
            "$ref": "#/components/schemas/Account"
          }
        },
        "required": [
          "id",
          "entityId",
          "entityName",
          "displayName",
          "currency",
          "processor",
          "connectionId",
          "connectionName",
          "externalId",
          "glAccount",
          "clearingAccount",
          "feeAccount",
          "revenueAccount",
          "bankAccount"
        ],
        "additionalProperties": false
      },
      "ListVendorNoticesResponseItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/Kind5"
          },
          "state": {
            "type": "string",
            "enum": [
              "DRAFTED",
              "SENT",
              "SUPPRESSED",
              "BOUNCED"
            ]
          },
          "reason": {
            "$ref": "#/components/schemas/Reason"
          },
          "recipientEmail": {
            "type": "string"
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "fr",
              "bilingual"
            ]
          },
          "subject": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "entity": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "entityTimeZone": {
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "vendor": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "displayName"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "inboundEmailId": {
            "type": [
              "string",
              "null"
            ]
          },
          "inboundRefusalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "digestNoticeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "digestHourStart": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "under": {
            "$ref": "#/components/schemas/Under"
          },
          "stoppedBy": {
            "$ref": "#/components/schemas/StoppedBy"
          },
          "createdAt": {
            "type": "string",
            "minLength": 20
          },
          "sentAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "sentVia": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "PRODUCT",
                  "BY_HAND"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "sentBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "sentNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "transport": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "postmark",
                  "log",
                  "test-copy"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "bouncedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "bounceReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "relayRefusal": {
            "type": [
              "string",
              "null"
            ]
          },
          "draftedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "discarded": {
            "$ref": "#/components/schemas/Retired"
          },
          "sendable": {
            "type": "boolean"
          },
          "outboundApproved": {
            "type": "boolean"
          },
          "sentence": {
            "type": "string"
          },
          "payment": {
            "$ref": "#/components/schemas/Payment"
          },
          "requested": {
            "$ref": "#/components/schemas/StoppedBy"
          },
          "recipientNew": {
            "type": "boolean"
          },
          "recipientConfirmedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "bill": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "number": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "number"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "vendorBankingChangeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "slipDistribution": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "reference"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "purchaseOrder": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "number": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "number"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "vendorPortalLink": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "contactName": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "contactName"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "vendorQuery": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "reference"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "vendorStatement": {
            "$ref": "#/components/schemas/VendorStatement"
          }
        },
        "required": [
          "id",
          "kind",
          "state",
          "reason",
          "recipientEmail",
          "language",
          "subject",
          "reference",
          "entity",
          "entityTimeZone",
          "address",
          "vendor",
          "inboundEmailId",
          "inboundRefusalId",
          "digestNoticeId",
          "digestHourStart",
          "under",
          "stoppedBy",
          "createdAt",
          "sentAt",
          "sentVia",
          "sentBy",
          "sentNote",
          "transport",
          "bouncedAt",
          "bounceReason",
          "relayRefusal",
          "draftedBy",
          "discarded",
          "sendable",
          "outboundApproved",
          "sentence",
          "payment",
          "requested",
          "recipientNew",
          "recipientConfirmedBy",
          "bill",
          "vendorBankingChangeId",
          "slipDistribution",
          "purchaseOrder",
          "vendorPortalLink",
          "vendorQuery",
          "vendorStatement"
        ],
        "additionalProperties": false
      },
      "NewPayees": {
        "maxItems": 500,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "paymentId": {
              "type": "string"
            },
            "sequence": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "vendor": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "displayName"
              ],
              "additionalProperties": false
            },
            "amountMinor": {
              "type": "string",
              "pattern": "^-?\\d+$"
            },
            "currency": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            },
            "priorPaymentCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "historicalMaxMinor": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "multipleTenths": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "paymentId",
            "sequence",
            "vendor",
            "amountMinor",
            "currency",
            "priorPaymentCount",
            "historicalMaxMinor",
            "multipleTenths"
          ],
          "additionalProperties": false
        }
      },
      "Payment": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "runId": {
                "type": "string"
              },
              "paymentDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "amountMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              }
            },
            "required": [
              "id",
              "runId",
              "paymentDate",
              "amountMinor",
              "currency"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "PendingChange": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "proposedBy": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              "proposedAt": {
                "type": "string",
                "minLength": 20
              }
            },
            "required": [
              "id",
              "proposedBy",
              "proposedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "PreparePaymentRunResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "RELEASED",
              "CANCELLED"
            ]
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "entityTimeZone": {
            "type": "string"
          },
          "bankAccount": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "displayName"
            ],
            "additionalProperties": false
          },
          "paymentDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "totalMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "paymentCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "preparedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "preparedAt": {
            "type": "string",
            "minLength": 20
          },
          "releasedBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "releasedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelledBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelledAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "reversalState": {
            "type": "string",
            "enum": [
              "NONE",
              "PARTLY_REVERSED",
              "REVERSED"
            ]
          },
          "method": {
            "type": "string",
            "enum": [
              "EFT",
              "CHEQUE",
              "WIRE"
            ]
          },
          "bankState": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "NOT_LODGED",
                  "AWAITING_BANK",
                  "ACCEPTED",
                  "REJECTED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "payments": {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "withheldMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "marks": {
                      "type": "object",
                      "properties": {
                        "newPayee": {
                          "type": "boolean"
                        },
                        "aboveHistoricalMax": {
                          "type": "boolean"
                        },
                        "historicalMaxMinor": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^-?\\d+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "priorPaymentCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "newPayeeNote": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "aboveHistoricalMaxNote": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "newPayee",
                        "aboveHistoricalMax",
                        "historicalMaxMinor",
                        "priorPaymentCount",
                        "newPayeeNote",
                        "aboveHistoricalMaxNote"
                      ],
                      "additionalProperties": false
                    },
                    "vendor": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "displayName": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "displayName"
                      ],
                      "additionalProperties": false
                    },
                    "bankingVerifiedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 20
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bankingVerifiedBy": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "amountMinor": {
                      "type": "string",
                      "pattern": "^-?\\d+$"
                    },
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "callbackRequired": {
                      "type": "boolean"
                    },
                    "callbackNote": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "entryNumber": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "entryStatus": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "DRAFT",
                            "PROPOSED",
                            "IN_REVIEW",
                            "APPROVED",
                            "POSTED",
                            "DECLINED",
                            "REVERSED"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bills": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "withholding": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "baseMinor": {
                                    "type": "string",
                                    "pattern": "^-?\\d+$"
                                  },
                                  "rateBp": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "withheldMinor": {
                                    "type": "string",
                                    "pattern": "^-?\\d+$"
                                  },
                                  "grossMinor": {
                                    "type": "string",
                                    "pattern": "^-?\\d+$"
                                  },
                                  "netMinor": {
                                    "type": "string",
                                    "pattern": "^-?\\d+$"
                                  },
                                  "waiver": {
                                    "$ref": "#/components/schemas/Waiver"
                                  },
                                  "decisions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "position": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": -9007199254740991,
                                              "maximum": 9007199254740991
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "decision": {
                                          "type": "string",
                                          "enum": [
                                            "IN_CANADA",
                                            "OUTSIDE_CANADA",
                                            "NOT_A_SERVICE"
                                          ]
                                        },
                                        "note": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "by": {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "decidedAt": {
                                          "type": "string",
                                          "minLength": 20
                                        }
                                      },
                                      "required": [
                                        "position",
                                        "decision",
                                        "note",
                                        "by",
                                        "decidedAt"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "baseMinor",
                                  "rateBp",
                                  "withheldMinor",
                                  "grossMinor",
                                  "netMinor",
                                  "waiver",
                                  "decisions"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "billId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "extractionId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "invoiceNumber": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "invoiceDate": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "dueDate": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "amountMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "voidedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 20
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "appliedMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "owedMinor": {
                            "type": "string",
                            "pattern": "^-?\\d+$"
                          },
                          "shortReason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "deductions": {
                            "$ref": "#/components/schemas/Deductions"
                          },
                          "discount": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "TAKEN"
                                      },
                                      "amountMinor": {
                                        "type": "string",
                                        "pattern": "^-?\\d+$"
                                      },
                                      "discountDate": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                      },
                                      "words": {
                                        "type": "string"
                                      },
                                      "account": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "code": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "code",
                                          "name"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "amountMinor",
                                      "discountDate",
                                      "words",
                                      "account"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "DECLINED"
                                      },
                                      "amountMinor": {
                                        "type": "string",
                                        "pattern": "^-?\\d+$"
                                      },
                                      "discountDate": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                      },
                                      "words": {
                                        "type": "string"
                                      },
                                      "reason": {
                                        "type": "string"
                                      },
                                      "declinedBy": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "name"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "amountMinor",
                                      "discountDate",
                                      "words",
                                      "reason",
                                      "declinedBy"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "MISSED"
                                      },
                                      "amountMinor": {
                                        "type": "string",
                                        "pattern": "^-?\\d+$"
                                      },
                                      "discountDate": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                      },
                                      "words": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "amountMinor",
                                      "discountDate",
                                      "words"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "withholding",
                          "billId",
                          "extractionId",
                          "invoiceNumber",
                          "invoiceDate",
                          "dueDate",
                          "amountMinor",
                          "voidedAt",
                          "appliedMinor",
                          "owedMinor",
                          "shortReason",
                          "deductions",
                          "discount"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "bankingSignals": {
                      "$ref": "#/components/schemas/BankingSignals"
                    },
                    "billSignals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "billId": {
                            "type": "string"
                          },
                          "number": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "signal": {
                            "$ref": "#/components/schemas/StoredOption1"
                          }
                        },
                        "required": [
                          "billId",
                          "number",
                          "signal"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "cheque": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "number": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 9007199254740991
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "ISSUED",
                                "VOIDED"
                              ]
                            },
                            "voidedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 20
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "voidReason": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "number",
                            "state",
                            "voidedAt",
                            "voidReason"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "removal": {
                      "$ref": "#/components/schemas/Retired"
                    },
                    "reversal": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "RETURNED",
                                "RUN_REVERSED"
                              ]
                            },
                            "by": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            "at": {
                              "type": "string",
                              "minLength": 20
                            },
                            "reversalEntryId": {
                              "type": "string"
                            },
                            "reversalEntryNumber": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "returnCode": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "R900",
                                    "R902",
                                    "R903",
                                    "R904",
                                    "R905",
                                    "R909",
                                    "R910",
                                    "R911",
                                    "R912",
                                    "R922",
                                    "R990",
                                    "OTHER"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "returnNote": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "returnedOn": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "bankingFlagged": {
                              "type": "boolean"
                            },
                            "document": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "fileName": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "fileName"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "by",
                            "at",
                            "reversalEntryId",
                            "reversalEntryNumber",
                            "returnCode",
                            "returnNote",
                            "returnedOn",
                            "bankingFlagged",
                            "document"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bankLine": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "payeeName": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "crossReference": {
                              "type": "string"
                            },
                            "sundry": {
                              "type": "string"
                            },
                            "fileSequence": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "PREVIEW",
                                "FILE"
                              ]
                            }
                          },
                          "required": [
                            "payeeName",
                            "crossReference",
                            "sundry",
                            "fileSequence",
                            "source"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rail": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "payoutId": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "QUEUED",
                                "SUBMITTED",
                                "SETTLED",
                                "FAILED",
                                "RETURNED"
                              ]
                            },
                            "providerStatus": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "reasonWords": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 300
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "mappedReturnCode": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "R900",
                                    "R902",
                                    "R903",
                                    "R904",
                                    "R905",
                                    "R909",
                                    "R910",
                                    "R911",
                                    "R912",
                                    "R922",
                                    "R990",
                                    "OTHER"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastEventAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 20
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "payoutId",
                            "status",
                            "providerStatus",
                            "reasonWords",
                            "mappedReturnCode",
                            "lastEventAt"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "sequence",
                    "withheldMinor",
                    "marks",
                    "vendor",
                    "bankingVerifiedAt",
                    "bankingVerifiedBy",
                    "amountMinor",
                    "currency",
                    "callbackRequired",
                    "callbackNote",
                    "entryNumber",
                    "entryStatus",
                    "bills",
                    "bankingSignals",
                    "billSignals",
                    "cheque",
                    "removal",
                    "reversal",
                    "bankLine",
                    "rail"
                  ],
                  "additionalProperties": false
                }
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "total": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "data",
              "nextCursor",
              "total"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "status",
          "entityId",
          "entityName",
          "entityTimeZone",
          "bankAccount",
          "paymentDate",
          "currency",
          "totalMinor",
          "paymentCount",
          "preparedBy",
          "preparedAt",
          "releasedBy",
          "releasedAt",
          "cancelledBy",
          "cancelledAt",
          "cancelReason",
          "reversalState",
          "method",
          "bankState",
          "payments"
        ],
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "$ref": "#/components/schemas/Code"
          },
          "requestId": {
            "type": [
              "string",
              "null"
            ]
          },
          "fields": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "remedy": {
            "type": "string"
          },
          "maxBytes": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "code"
        ],
        "additionalProperties": false
      },
      "Proposals": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ProposalsItem"
        }
      },
      "ProposalsItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "financialAccountId": {
            "type": "string"
          },
          "shape": {
            "type": "string",
            "enum": [
              "ONE_TO_ONE",
              "ONE_TO_MANY",
              "MANY_TO_ONE",
              "SPLIT"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "PROPOSED",
              "ACCEPTED",
              "REJECTED",
              "SUPERSEDED"
            ]
          },
          "scoreBp": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          },
          "evidence": {
            "type": "string"
          },
          "signals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "AMOUNT_EXACT",
                    "AMOUNT_NEAR",
                    "DATE_WINDOW",
                    "COUNTERPARTY",
                    "REFERENCE",
                    "HISTORY"
                  ]
                },
                "scoreBp": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 10000
                },
                "weightBp": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 10000
                },
                "phrase": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "scoreBp",
                "weightBp",
                "phrase"
              ],
              "additionalProperties": false
            }
          },
          "bankLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Line"
            }
          },
          "candidates": {
            "$ref": "#/components/schemas/Candidates"
          },
          "proposedAt": {
            "type": "string",
            "minLength": 20
          },
          "proposedBy": {
            "type": "string"
          },
          "decidedAt": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "decidedBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "decisionReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "ruleId": {
            "type": [
              "string",
              "null"
            ]
          },
          "expectedClearing": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "paymentRunId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "paymentId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "runLabel": {
                    "type": "string"
                  },
                  "lineCount": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "amountMinor": {
                    "type": "string",
                    "pattern": "^-?\\d+$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "expectedOn": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "windowFrom": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "windowTo": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "OPEN",
                      "MATCHED",
                      "WITHDRAWN"
                    ]
                  }
                },
                "required": [
                  "id",
                  "paymentRunId",
                  "paymentId",
                  "runLabel",
                  "lineCount",
                  "amountMinor",
                  "currency",
                  "expectedOn",
                  "windowFrom",
                  "windowTo",
                  "status"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "openBills": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "billId": {
                  "type": "string"
                },
                "number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "supplierName": {
                  "type": "string"
                },
                "vendorId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dueDate": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "openMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                "currency": {
                  "type": "string",
                  "pattern": "^[A-Z]{3}$"
                },
                "paidBy": {
                  "type": "string",
                  "enum": [
                    "RUN",
                    "CARD",
                    "PAD",
                    "ACCOUNT",
                    "CHEQUE",
                    "WIRE",
                    "ETRANSFER",
                    "OTHER"
                  ]
                }
              },
              "required": [
                "billId",
                "number",
                "supplierName",
                "vendorId",
                "dueDate",
                "openMinor",
                "currency",
                "paidBy"
              ],
              "additionalProperties": false
            }
          },
          "openInvoices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "invoiceId": {
                  "type": "string"
                },
                "number": {
                  "type": "string"
                },
                "customerId": {
                  "type": "string"
                },
                "customerName": {
                  "type": "string"
                },
                "dueDate": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "openMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                "currency": {
                  "type": "string",
                  "pattern": "^[A-Z]{3}$"
                },
                "evidence": {
                  "type": "string"
                }
              },
              "required": [
                "invoiceId",
                "number",
                "customerId",
                "customerName",
                "dueDate",
                "openMinor",
                "currency",
                "evidence"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "financialAccountId",
          "shape",
          "status",
          "scoreBp",
          "evidence",
          "signals",
          "bankLines",
          "candidates",
          "proposedAt",
          "proposedBy",
          "decidedAt",
          "decidedBy",
          "decisionReason",
          "ruleId",
          "expectedClearing",
          "openBills",
          "openInvoices"
        ],
        "additionalProperties": false
      },
      "Reason": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "REPLIES_OFF",
              "REPLIES_EXPIRED",
              "NO_CONTACT",
              "OUTBOUND_NOT_APPROVED",
              "RELAY_REFUSED",
              "PERSON_DRAFTED",
              "NO_SENDER",
              "OWN_DOMAIN",
              "AUTO_SUBMITTED",
              "UNAUTHENTICATED_STRANGER",
              "RECIPIENT_STOPPED",
              "RECIPIENT_BOUNCED",
              "FOLDED_INTO_DIGEST",
              "LEDGER_DAILY_CAP",
              "DISCARDED",
              "TEST_COPY_HELD"
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "RecordReceiptResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "displayName"
            ],
            "additionalProperties": false
          },
          "receivedOn": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "amountMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "appliedMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "unappliedMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "method": {
            "type": "string",
            "enum": [
              "EFT",
              "CHEQUE",
              "CARD",
              "CASH",
              "OTHER",
              "PAD",
              "WIRE",
              "DIRECT_DEPOSIT",
              "ETRANSFER"
            ]
          },
          "processor": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "STRIPE",
                  "SHOPIFY",
                  "SQUARE"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "bankAccount": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "displayName"
            ],
            "additionalProperties": false
          },
          "sourceTransactionId": {
            "type": [
              "string",
              "null"
            ]
          },
          "entryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "entryNumber": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "entryStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "preGoLive": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "goLiveDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "required": [
                  "goLiveDate"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "recordedBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "createdAt": {
            "type": "string",
            "minLength": 20
          },
          "applications": {
            "$ref": "#/components/schemas/Applications"
          },
          "direction": {
            "type": "string",
            "enum": [
              "IN",
              "OUT"
            ]
          },
          "refundedMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "voided": {
            "$ref": "#/components/schemas/Voided2"
          },
          "deposit": {
            "$ref": "#/components/schemas/Deposit"
          }
        },
        "required": [
          "id",
          "entityId",
          "entityName",
          "customer",
          "receivedOn",
          "amountMinor",
          "appliedMinor",
          "unappliedMinor",
          "currency",
          "method",
          "reference",
          "bankAccount",
          "sourceTransactionId",
          "entryId",
          "entryNumber",
          "entryStatus",
          "recordedBy",
          "createdAt",
          "applications",
          "direction",
          "refundedMinor",
          "voided",
          "deposit"
        ],
        "additionalProperties": false
      },
      "Retired": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "by": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              "at": {
                "type": "string",
                "minLength": 20
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "by",
              "at",
              "reason"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "RunwayOption1": {
        "type": "object",
        "properties": {
          "today": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "balanceMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "horizonDays": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "crossesZeroOn": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "lowestMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "lowestOn": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "endBalanceMinor": {
            "type": "string",
            "pattern": "^-?\\d+$"
          },
          "lastMovementOn": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "days": {
            "maxItems": 91,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "on": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "bills": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "outMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                },
                "balanceAfterMinor": {
                  "type": "string",
                  "pattern": "^-?\\d+$"
                }
              },
              "required": [
                "on",
                "bills",
                "outMinor",
                "balanceAfterMinor"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "today",
          "balanceMinor",
          "horizonDays",
          "crossesZeroOn",
          "lowestMinor",
          "lowestOn",
          "endBalanceMinor",
          "lastMovementOn",
          "days"
        ],
        "additionalProperties": false
      },
      "ScanOption1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "financialAccountId": {
            "type": "string"
          },
          "ranAt": {
            "type": "string",
            "minLength": 20
          },
          "ranBy": {
            "type": "string"
          },
          "bankLinesConsidered": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "candidatesConsidered": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "proposalsWritten": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "refusals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "reason": {
                  "type": "string",
                  "enum": [
                    "ALREADY_MATCHED",
                    "CURRENCY_MISMATCH"
                  ]
                },
                "candidateId": {
                  "type": "string"
                },
                "bankLineId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "detail": {
                  "type": "string"
                }
              },
              "required": [
                "reason",
                "candidateId",
                "bankLineId",
                "detail"
              ],
              "additionalProperties": false
            }
          },
          "truncations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "bankLineId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "candidateId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "eligible": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "considered": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "maxGroupSize": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "bankLineId",
                "candidateId",
                "eligible",
                "considered",
                "maxGroupSize"
              ],
              "additionalProperties": false
            }
          },
          "clearingsConsidered": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "clearingProposals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "openBillsConsidered": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "openBillProposals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "financialAccountId",
          "ranAt",
          "ranBy",
          "bankLinesConsidered",
          "candidatesConsidered",
          "proposalsWritten",
          "refusals",
          "truncations",
          "clearingsConsidered",
          "clearingProposals",
          "openBillsConsidered",
          "openBillProposals"
        ],
        "additionalProperties": false
      },
      "SkipReasonOption1": {
        "type": "string",
        "enum": [
          "BILL_HELD",
          "NO_VENDOR",
          "VENDOR_ARCHIVED",
          "VENDOR_HELD",
          "VENDOR_NOT_ACCEPTED",
          "NO_BANKING",
          "BANKING_PENDING",
          "BANKING_RETURNED",
          "BANKING_FOREIGN",
          "IN_RUN",
          "CURRENCY_DIFFERS",
          "PLANNED_LATER",
          "DECLINED_RECENTLY",
          "OPEN_SIGNAL",
          "CREDIT_AVAILABLE",
          "WITHHOLDING_REVIEW",
          "PER_BILL_CAP",
          "MAX_BILLS",
          "WEEK_CAP",
          "NEW_PAYEE",
          "ABOVE_HISTORICAL_MAX",
          "REFUSED_AT_PREPARE"
        ]
      },
      "State": {
        "type": "string",
        "enum": [
          "NO_CONTACT_ON_RECORD",
          "NOT_DRAFTED",
          "TO_SEND",
          "NEEDS_SECOND_PERSON",
          "NOT_SENDABLE",
          "ON_ITS_WAY",
          "NOT_SENT_GAVE_UP",
          "SENT",
          "BOUNCED",
          "DISCARDED",
          "REVERSAL_TO_SEND",
          "REVERSAL_SENT"
        ]
      },
      "StoppedBy": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "by": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              "at": {
                "type": "string",
                "minLength": 20
              }
            },
            "required": [
              "by",
              "at"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "StoredOption1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/Kind4"
          },
          "state": {
            "type": "string",
            "enum": [
              "OPEN",
              "DISMISSED",
              "CONFIRMED"
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "CRITICAL",
              "WARNING",
              "INFO"
            ]
          },
          "sentence": {
            "type": "string"
          },
          "observedAt": {
            "type": "string",
            "minLength": 20
          },
          "decision": {
            "$ref": "#/components/schemas/Decision"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "state",
          "severity",
          "sentence",
          "observedAt",
          "decision",
          "label"
        ],
        "additionalProperties": false
      },
      "SuggestFeedAccountResponse": {
        "type": "object",
        "properties": {
          "suggestion": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "glAccountId": {
                    "type": "string"
                  },
                  "glAccountCode": {
                    "type": "string"
                  },
                  "glAccountName": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "RULE",
                      "MODEL"
                    ]
                  },
                  "basis": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "compared": {
                    "type": "object",
                    "properties": {
                      "candidates": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "sent": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "candidates",
                      "sent"
                    ],
                    "additionalProperties": false
                  },
                  "decided": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ACCEPTED",
                          "CHANGED",
                          "DECLINED"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "promptVersion": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "glAccountId",
                  "glAccountCode",
                  "glAccountName",
                  "source",
                  "basis",
                  "reason",
                  "compared",
                  "decided",
                  "promptVersion"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "why": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "NOT_A_BANK_FEED",
                  "NO_ASSET_ACCOUNT",
                  "NO_CONFIDENT_MATCH",
                  "DISCLOSURE",
                  "BUDGET",
                  "REFUSED",
                  "UNPARSABLE",
                  "PROVIDER",
                  "ALREADY_DECIDED"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "suggestion",
          "why"
        ],
        "additionalProperties": false
      },
      "Suggestion": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "weekCapMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              }
            },
            "required": [
              "weekCapMinor"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "perBillCapMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              }
            },
            "required": [
              "perBillCapMinor"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "dueWithinDays": {
                "type": "integer",
                "minimum": 0,
                "maximum": 60
              }
            },
            "required": [
              "dueWithinDays"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "discountLapsesWithinDays": {
                "type": "integer",
                "minimum": 0,
                "maximum": 30
              }
            },
            "required": [
              "discountLapsesWithinDays"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "excludeVendorIds": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "excludeVendorIds"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ThenOption7": {
        "type": "object",
        "properties": {
          "prepare": {
            "type": "object",
            "properties": {
              "financialAccountId": {
                "type": "string",
                "minLength": 1
              },
              "method": {
                "type": "string",
                "enum": [
                  "EFT",
                  "CHEQUE",
                  "WIRE"
                ]
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "perBillCapMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              "weekCapMinor": {
                "type": "string",
                "pattern": "^-?\\d+$"
              },
              "maxBills": {
                "type": "integer",
                "minimum": 1,
                "maximum": 200
              },
              "weekday": {
                "type": "string",
                "enum": [
                  "MON",
                  "TUE",
                  "WED",
                  "THU",
                  "FRI",
                  "SAT",
                  "SUN"
                ]
              },
              "payInDays": {
                "type": "integer",
                "minimum": 0,
                "maximum": 14
              }
            },
            "required": [
              "financialAccountId",
              "method",
              "currency",
              "perBillCapMinor",
              "weekCapMinor",
              "maxBills",
              "weekday",
              "payInDays"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "prepare"
        ],
        "additionalProperties": false
      },
      "Totals2": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "entityId": {
              "type": "string"
            },
            "entityName": {
              "type": "string"
            },
            "currency": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            },
            "minor": {
              "type": "string",
              "pattern": "^-?\\d+$"
            }
          },
          "required": [
            "entityId",
            "entityName",
            "currency",
            "minor"
          ],
          "additionalProperties": false
        }
      },
      "Under": {
        "anyOf": [
          {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "SETTING"
                  },
                  "by": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "enabledAt": {
                    "type": "string",
                    "minLength": 20
                  },
                  "expiresAt": {
                    "type": "string",
                    "minLength": 20
                  }
                },
                "required": [
                  "kind",
                  "by",
                  "enabledAt",
                  "expiresAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "PERSON"
                  },
                  "by": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "by"
                ],
                "additionalProperties": false
              }
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "UndoAgentBatchResponse": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "const": "job_started"
          },
          "job": {
            "$ref": "#/components/schemas/Job"
          },
          "existing": {
            "type": "boolean"
          }
        },
        "required": [
          "outcome",
          "job",
          "existing"
        ],
        "additionalProperties": false
      },
      "VendorStatement": {
        "default": null,
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "statementDate": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "statementDate"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "Voided2": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "at": {
                "type": "string",
                "minLength": 20
              },
              "by": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              "reason": {
                "type": "string"
              },
              "entryId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "entryNumber": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "entryStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "DRAFT",
                      "PROPOSED",
                      "IN_REVIEW",
                      "APPROVED",
                      "POSTED",
                      "DECLINED",
                      "REVERSED"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "at",
              "by",
              "reason",
              "entryId",
              "entryNumber",
              "entryStatus"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "Waiver": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "craReference": {
                "type": "string"
              },
              "rateBp": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "validFrom": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "validTo": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              }
            },
            "required": [
              "id",
              "craReference",
              "rateBp",
              "validFrom",
              "validTo"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "WindowOption1": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "DAYS"
              },
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 28
              }
            },
            "required": [
              "kind",
              "days"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "THROUGH"
              },
              "on": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              }
            },
            "required": [
              "kind",
              "on"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "responses": {
      "Problem400": {
        "description": "The request has no Idempotency-Key header.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem401": {
        "description": "The key or token is missing, malformed, unknown, revoked or expired.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem403": {
        "description": "The key or token may not do this, or the books are closed to the API.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem404": {
        "description": "There is no such record on these books.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem409": {
        "description": "An identical request is still running, or another change reached the record first.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem412": {
        "description": "The books refuse this in their current state. The problem body says what to change.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem422": {
        "description": "A field is invalid or cannot be set through the API, or the Idempotency-Key was reused for a different request.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem429": {
        "description": "Too many requests. Wait the number of seconds in Retry-After.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          },
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "Problem500": {
        "description": "A fault on our side. Quote the X-Request-Id when you write to us.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "A new value for each new request (a UUID is fine), the same value when you retry it. Kept for 7 days.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        }
      }
    },
    "headers": {
      "XRequestId": {
        "description": "Quote this when you write to us about the call.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimitPolicy": {
        "description": "The quota and window of this class of call, for example \"reads\";q=300;w=60.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit": {
        "description": "What is left of the quota and when it resets, for example \"reads\";r=250;t=30.",
        "schema": {
          "type": "string"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before sending the same request again.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "LedgerPosition": {
        "description": "The position in the ledger's event log after this write. Pass it to listEvents as startPosition to read what followed.",
        "schema": {
          "type": "string",
          "pattern": "^[0-9]{1,19}$"
        }
      },
      "Location": {
        "description": "Where to read the record that was created, or the page where a person confirms the act.",
        "schema": {
          "type": "string"
        }
      }
    }
  }
}
